/codebase-guide:codebase-guidefrom codebase-guide
Write a visual, single-file HTML onboarding report for the repo in the working directory, in the design system the plugin's design_system setting names (default meridian; builtin = the bundled template.html), so a beginner understands it on the first read and an expert finds any file in five minutes. Use on /codebase-guide:codebase-guide, or when the user asks for a codebase guide, onboarding doc, architecture overview or "explain this repo". Writes one HTML file, no other edits.
Ships in codebase-guide. 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.
You write one HTML report that teaches any developer what this codebase does, how it is built and where everything lives.
The look comes from the design_system setting (switch it in /config, or
per session with CODEBASE_GUIDE_DESIGN_SYSTEM; builtin = this skill's own
template).
docs/codebase-guide.html. Use the path the user gives.Run python3 "${CLAUDE_PLUGIN_ROOT}/lib/design_system.py" first.
builtin: follow Builtin below.<name> <dir>: follow Design system <dir> below.Read before you write. Base every claim on code you read, and flag anything unclear or apparently unused instead of guessing (a caveat callout).
The template is a worked sample of a fictional project, "Quill". Keep its
head, styles, script and shell; replace only the content, following its
SLOT: comments, and drop the sample comments. Metadata: real repository,
the commit hash you read, today's date, an honest reading time; fill the
colophon the same way. The result is one file that works offline: no
external fonts, scripts, images, styles or other URLs; well formed, tags
balanced, ids unique.
Read ${CLAUDE_PLUGIN_ROOT}/skills/codebase-guide/template.html. Write the
guide straight to the output path.
Keep the <head>, all CSS, the theme tokens, the layout and the script
exactly as they are. Replace only the masthead, the .toc entries and the
content of <main>.
Reuse the template's components and classes. Do not invent styles. If
something truly has no component, add the smallest CSS for it using the
existing tokens (--paper-2, --rule, --ink-2, --c1…--c6).
Tables and <details> have no component. Add this one block at the end
of the <style> element and use it for sections 6 and 8:
.map { width: 100%; border-collapse: collapse; font: .92rem/1.5 var(--sans); }
.map th, .map td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.map th { font: 600 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
details { border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); padding: 12px 18px; margin: 14px 0; }
summary { cursor: pointer; font: 600 1rem var(--sans); }
Extend the sidebar <ol> to all eight sections, in the template's
<li><a href="#id"><span>NN</span>Title</a></li> form.
Each section is <section class="section" id="…"> with a .section-head
(.section-num, h2, optional .section-intro). Per section:
.prose (first sentence .lead.dropcap), a .facts strip, the
diagram in a .figure (.figure-frame svg, figcaption, .legend).dl.glossary of .term entries (dt, dd, optional .see)..parts grid, one article.part cN per component with part-head,
part-root, part-what, ul.resp, ul.files and .talks chips, each
id="part-<name>"; reuse its colour class in the diagrams. Caveats in
.callout.caveat.ol.steps whose .step-n numbers match the d-badge numbers in the
SVG; each step has .where (path and code.fn). Side notes in
.callout.note.article.pattern each with .pattern-tag, h3, description, a
figure.code (code-head with path and line range; pre with
data-lang, data-start and data-hl set to real line numbers) and
a p.why.table.map, code.path for files and folders.figure.code blocks with data-lang="sh".<details><summary> block each.Diagrams use only the d-* classes and cN colour tokens: d-node,
d-data, d-actor, d-title, d-sub, d-edge, d-elabel,
d-lifeline, d-activation, d-badge, d-frame.
<dir><dir>/AI_AUTHORING.md and follow it. Read
<dir>/templates/codebase-guide.html; if it does not exist, use the
closest generic template that AI_AUTHORING.md names.SLOT: comments for every
section and diagram; they replace the Builtin class rules.<output>.draft.html, never under
the plugin directory, with every ../assets/ link rewritten to the
absolute <dir>/assets/.node "<dir>/tools/export.mjs" <draft> <output> && rm <draft>.
If the export fails, show its stderr, fix the draft and rerun.in-one-minute): 3–5 plain sentences, a strip of
real numbers, and the big-picture diagram.key-words): 6–12 terms, each defined in 1–2 sentences,
optionally pointing to the defining file.main-parts): one card per component: root folder,
what it does, responsibilities, key files, what it talks to. Add a
folder-map diagram here or in section 1. Unclear or unused code goes in
a caveat.how-it-runs): a sequence or flow diagram of one real
run, then numbered steps matching the diagram's numbers; each step names
its path and function. Side notes go in a note.patterns): one entry per convention: tag, title,
short description, a real 5–15 line excerpt (path and real line range
in its header; escape < and &) and why it is done this way.where-to-find): a table with "I want to…"
first and the file or folder second. Cover every feature and common task.run-it): setup, run and test commands copied from
the repo (README, Makefile, package.json, pyproject.toml).going-deeper): invariants, trade-offs, limits and
gotchas, each collapsible.Label diagram boxes with real names, give unique ids to title, desc and
markers, and add a one-line caption to each.
Short sentences, plain words, each term defined on first use, an analogy where it helps. Good: "The runner is like a race referee: it starts both lanes, times them, and writes down the results." Bad: "The runner orchestrates lane execution and persists telemetry." Summary on top, expert detail in collapsible blocks. Only real repo-relative paths and real symbol names.
assets/ references and the draft
is gone.Final reply: the output path, the design system used, and a three-line summary.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dimitritholen/codebase-guide --plugin codebase-guide