From explain-codebase
Explain how this codebase works using ASCII diagrams plus prose. Use when the user asks to understand or be onboarded to the code — "how does X work," "walk me through," "explain the architecture/flow," "where does X happen," "trace this request," "give me an overview," or any "why is it built this way" question. Distinct feature: answers are illustrated with monospace ASCII diagrams (flows, trees, sequences, layers, state machines) and cite specific files and line numbers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/explain-codebase:explain-codebaseThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Answer questions about the codebase with clear explanations and ASCII visualizations.
Answer questions about the codebase with clear explanations and ASCII visualizations.
Defaults like searching and reading code are assumed. What this skill adds:
references/diagram-toolkit.md) — this is the point of the skill, not an optional extra.path:line), verified against the current file.Before falling back to repeated grep/read passes, check for codegraph — a local, pre-indexed code graph that answers structural questions (symbols, callers, callees, impact) in one query. It typically cuts exploration tokens and tool calls roughly in half on a well-indexed repo. Use it as the fast path; grep/read remain the always-available fallback.
command -v codegraph. If it isn't installed, explore with Glob/Grep/Read as usual and skip the rest of this section.codegraph init then codegraph index (the first index can take a while on large repos; it auto-syncs afterward).codegraph query <symbol|text> — locate definitions and symbols fast (full-text).codegraph callers <symbol> / codegraph callees <symbol> — trace call flow; this is your raw material for sequence and data-flow diagrams.codegraph impact <symbol> — blast radius, for "what breaks if I change X" questions.
Build the ASCII diagram from this output, then Read the cited lines to confirm before quoting them.Prefer the MCP server (codegraph serve --mcp) if you'd rather expose these as native tools instead of shelling out. Install, command reference, and MCP setup live in references/codegraph.md.
Real failure points when explaining a codebase — these shift the work away from naive defaults:
codegraph index or drop to grep — never quote graph output you haven't confirmed against the current source.services/ may hold dead code; a call graph beats a directory listing for "what calls what."dist/, build/, node_modules/, *.generated.*, protobuf/ORM output, lockfiles — these distort "most important files" lists. Explain the source that produces them, not the artifact.file.ts:34-52, re-Read to confirm the range still matches before quoting it.git log/git blame on the relevant lines when the answer is about intent or a past decision, not current structure.Use a diagram for anything with structure, flow, or state. The full gallery — boxes/flow, hierarchy trees, data flow, sequence diagrams, layer stacks, state machines, comparison tables — plus two fully worked example interactions are in references/diagram-toolkit.md. Read it when you need a pattern to copy.
If asked to explain the codebase generally (no specific question):
README.md and CLAUDE.md (as claims to verify, not gospel).references/diagram-toolkit.md).Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub doyled-it/explain-codebase-skill --plugin explain-codebase