Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

structure-codebase

БесплатноБез исполняемых скриптовНе проверен

Design, audit, and evolve physical source and package structures that expose real architectural boundaries while keeping related behavior together. Use when…

citypaulот citypaul★ 764 звезды на GitHub

Об этом скилле

Structure Codebase

Design the source tree as a truthful map of meaning, ownership, runtime boundaries, and change cohesion. Do not start from a universal template. Select the lightest structure that makes this project's real seams easy to see and mechanically difficult to violate.

Use this skill for physical placement and dependency enforcement, including audits specifically about source trees, folders, packages, exports, or import direction. Load codebase-design when the question is which coherent responsibility and caller-facing contract a module should own; load improve-codebase-architecture when the unresolved question is which broader architecture investment is worth making and why now. Load reduce-system-complexity when a flatter tree is intended to support an evidence-backed claim that real dependencies, hops, states, or operational mechanism disappeared—a physical move alone is not reduction. Load evaluate-existing-solutions only when monorepo, build, workspace, or boundary-enforcement tooling is materially unresolved. Load hexagonal-architecture for port and adapter implementation, and domain-driven-design for domain modeling. Those patterns are independent; never infer that using one requires the other.

Read the relevant reference before producing a target tree:

Core Model

Read a well-structured codebase from broadest meaning to narrowest detail:

  1. Product or capability — why the code exists and who owns it.
  2. Architectural boundary — inside versus outside, but only when that boundary is real.
  3. Feature, domain concept, use case, workflow, or endpoint — what changes together.
  4. Implementation detail — framework, persistence, SDK, protocol, and small helpers.

Treat “screaming architecture” as a fitness question, not a folder taxonomy: can a newcomer tell what the system does? Technical names such as hexagon, adapters, driving, driven, and composition are useful at real seams. They are harmful only when they replace product meaning or claim boundaries that do not exist.

Folder names make claims. Packages, exports, imports, tests, and automated boundary rules prove them.

Keep the Axes Distinct

Axis It answers Do not confuse it with
Capability Why does this code exist and change? A technical layer
Bounded context Where does language and model authority change? A noun, table, team label, or folder of convenience
Hexagon What policy must remain independently testable from external technology? DDD, a generic core, or every pure library
Feature/use case What behavior changes together? A required package or bounded context
Endpoint Where does a BFF request enter? The owner of shared workflow state
Package/module What boundary can tooling enforce? A business boundary by itself
Composition root Where is the runtime object graph constructed and owned? A mandatory folder in every library

Workflow

1. Preserve the Requested Scope

Determine whether the user asked for an audit, proposal, migration plan, or implementation. Do not move files for a suggestion-only request. Do not broaden a folder change into a domain redesign without authorization.

2. Inspect Before Naming

Read enough of the actual system to avoid designing from filenames alone:

  • Project rules, architecture decisions, glossary, roadmap, and package index.
  • Routes, screens, commands, jobs, components, state/data owners, tests, public exports, and user-facing language.
  • Package manifests, source imports, runtime/deployment units, and provider dependencies.
  • Framework-required locations, generated code, workspace globs, build/test configuration, and boundary tooling.
  • Recent changes or ownership signals that reveal which files change together.

Record uncertainty. Candidate bounded contexts and package splits are hypotheses until language, invariants, ownership, or dependency direction justify them.

3. Select the Smallest Honest Shape

| Project signal | Primary shape | |------

Полный SKILL.md на GitHub

Установить structure-codebase в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yamlreferences/backend-patterns.mdreferences/enforcement-and-migration.mdreferences/frontend-patterns.mdreferences/research-notes.mdreferences/visible-hexagon.md

FAQ

Что делает скилл structure-codebase?

Design, audit, and evolve physical source and package structures that expose real architectural boundaries while keeping related behavior together. Use when creating or reviewing repository trees, deciding where files or packages belong, reducing flat folders, organizing by feature, route, screen, use case, bounded context, workflow or endpoint, structuring frontend state/data/UI ownership and design systems, making hexagonal inside/outside boundaries visible, locating ports, adapters and composition roots, structuring BFF routes, planning folder migrations, or enforcing package and import direction. For one module's logical responsibility, deepening, splitting, or caller contract use codebase-design; for repository-wide architecture investment discovery use improve-codebase-architecture. A physical flattening alone is not a reduce-system-complexity result.

Как установить скилл structure-codebase?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл structure-codebase запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить structure-codebase с