Command Palette

Search for a command to run...

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

codebase-layout

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

WHEN designing, auditing, or migrating physical source trees, packages, build targets, placement rules, or import-direction enforcement; NOT for one module's…

mintuzот mintuz★ 38 звёзд на GitHub

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

Codebase Layout

Design the physical source tree as an accurate map of product capability, ownership, runtime boundaries, and change cohesion. Do not start from a universal template. Choose the smallest honest structure that makes real boundaries visible and mechanically enforced.

References

Before you propose a tree or a migration, read each reference whose condition applies:

Reference Read when
references/web-layouts.md Structuring or auditing web backends, BFFs (backend-for-frontend hosts), frontends, full-stack meta-frameworks, design systems, or workspace and linter boundary rules
references/ios-layouts.md Structuring or auditing iOS, watchOS, or extension apps, local Swift Packages, build targets, Xcode project organisation, or Apple platform adapters
references/migration-and-enforcement.md Moving existing code, changing directory or package depth, or designing automated import, manifest, or build-target boundary checks

Core Model

Order the tree from broadest meaning to narrowest detail:

  1. Product or capability — why the code exists and who owns it.
  2. Architectural boundary — inside versus outside, only when that boundary is real and enforced.
  3. Feature, domain concept, use case, workflow, or public interface — what changes together or how callers enter.
  4. Implementation detail — framework glue, persistence, SDK wrappers, and local helpers.

Treat directory names as claims. Prove every claimed boundary with packages, build targets, public visibility rules, static import checks, or architecture tests.

Keep Axes Distinct

Axis Answers Do not confuse with
Capability Why does this code exist and change? A technical layer
Bounded context Where do domain language and model authority change? A single noun, database table, team name, or convenience folder
Hexagon Which policy must run and test without external technology? Every pure utility, a generic core folder, or domain modelling alone
Feature or use case Which behaviour changes together? A mandatory separate package or bounded context
Public interface leaf Where does an external request or command enter? The owner of shared workflow state or domain policy
Package or build target Which boundary can build and lint tools enforce? A business boundary by itself
Composition root Where is the live object graph constructed and wired? A mandatory folder inside libraries or every feature

Workflow

1. Preserve the Requested Scope

Before you read deeply or propose edits, classify the request as an audit, a proposal, a migration plan, or authorised file edits.

  • If the user asks for an audit, proposal, or migration plan, do not move or edit files.
  • Do not expand a physical layout change into a domain redesign or a behaviour rewrite without explicit authorisation.

2. Inspect Before Naming

Do not design from directory listings alone. Read enough real code and project configuration to ground every boundary in evidence:

  • Architecture decisions, glossaries, module indexes, and repository rules.
  • Public interfaces (routes, screens, commands, jobs, public exports), state and data owners, and tests.
  • Build and package manifests, source imports, runtime entry points, and external SDK dependencies.
  • Framework-required paths, generated code locations, workspace or target discovery globs, and existing boundary checks.
  • Change history or ownership signals that show which files change together.

Record uncertainty explicitly. Treat unverified context or package splits as hypotheses until language, invariants, ownership, or dependency direction prove them.

3. Select the Smallest Honest Shape

Match the physical shape to observed evidence:

Observed signal Primary shape
Tiny library or early prototype Flat or nearly flat module
Ordinary service or app without ports and adapters Feature-first or use-case-first
Bounded contexts without ports and adapters Context-first with explicit public contracts
Explicitly opted-in ports-and-adapters system Capability first, then visible inside/outside, then featureful interior
Public-interface-heavy host (for example HTTP API, BFF, or CLI) Public interface tree (endpoints or commands) plus sibling workflows and composition
Framework-constrained host Thin required framework entry points delegating to feature modules
Small UI client Framework-native screen or route tree with shallow colocation
Feature-rich UI client Screen or route composition plus product-feature modules and named foundations
Multi-runtime or full-stack app Explicit runtime separation (for example client versus server) enforced in the build graph
Multi-app or multi-platform workspace Product or capability grouping
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

references/ios-layouts.mdreferences/migration-and-enforcement.mdreferences/web-layouts.md

FAQ

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

WHEN designing, auditing, or migrating physical source trees, packages, build targets, placement rules, or import-direction enforcement; NOT for one module's logical types and caller contract (architect), repository-wide architecture hotspot triage (architecture-audit), or semantic ports-and-adapters rules (hexagonal-architecture); produces an evidence-backed layout, dependency rules, proportionate enforcement, and a staged migration plan.

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

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

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

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

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

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