/codebase-architecture:codebase-architecture-analyzefrom codebase-architecture
Analyze architecture into C4, ADRs, debt, and reimplementation maps. Use when documenting or reverse-engineering a repo.
Ships in codebase-architecture. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Transform an opaque codebase into durable architecture documentation. This is the analysis / extract half of the reimplementation playbook (see playbook-chain.md and vault comparisons/codebase-analysis-reimplementation-skills.md).
Before writing durable extracts, invoke skill codebase-design (load glossary + principles). Use its terms exactly — module, interface, depth, seam, adapter, leverage, locality — in every extract.
C4 vs design vocabulary: C4 Component is a diagram level only. Extract files and design prose use module / seam cluster. See c4-evidence.md.
Before writing files, resolve the extract root per output-routing.md:
--save / path from userprojects/{slug}/ exists (slug algorithm in output-routing) → {WIKI}/projects/{slug}/architecture/{TARGET_REPO}/docs/architecture/--ephemeral → terminal onlyAnnounce the resolved output root to the user before bulk writes.
Pin source commit/tag in every file header. Plugin version: read .claude-plugin/plugin.json → version (see output-routing). Prefer numbered extract set:
| File | Content |
|---|---|
00-reimplementation-blueprint.md | E2E flow + milestone plan + verify commands |
01-topology.md | Tree, stack, entry points, deps, scope, observed vs inferred; short C4 overview may live here |
02-module-{name}.md, 03-module-{name}.md, … | Sequential major module / seam cluster specs (start at 02) |
04-adrs.md or adrs/ADR-*.md | Optional when ADR register is large; else ADRs section in 01/00 |
05-tech-debt.md | Optional when debt register is large |
08-*.md / 09-*.md | Optional layer inventories |
git describe --tags --always, short SHA, package/UI versions if they differ.Write 01-topology.md early. Separate Observed vs Inferred bullets.
For each major module (design vocabulary):
Document structural patterns (layered, hexagonal, event-driven, …), design patterns in use, data patterns (repository, CQRS, …). Note deviations from textbook form with file evidence.
01-topology.md; use a separate file only if large.04-adrs.md / adrs/ or a section in 00/01.05-tech-debt.md or a section in 00/01.Produce:
00-reimplementation-blueprint.md with bottom-up milestones and verify commandsskillwiki project-index --project {slug} --apply when available.improve-codebase-architecture / architecture-to-spec / external migrate).| Need | Skill |
|---|---|
| Deep-module language | codebase-design (load first) |
| Find shallow clusters to refactor | improve-codebase-architecture |
| Turn analysis into PRD | architecture-to-spec |
| Batched multi-file rewrite | external codebase-migrate (not bundled) |
| External GitHub / freshness evidence | deep-research / PavedPath |
| Full chain chooser | codebase-architecture router |
docs/architecture/.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub karlorz/agent-skills --plugin codebase-architecture5 skills in this plugin
/architecture-to-specTurn architecture analysis into a PRD or spec without interviewing. Use after codebase-architecture-analyze or for a feature spec./codebase-architectureRoute architecture work to analyze, design, improve, or to-spec. Use when the user asks for codebase-architecture./codebase-designDesign a module interface, seams, and testability. Use when another architecture skill needs deep-module vocabulary.Other plugins' skills for the same job