Create Onboarding Guide
Produce one self-contained HTML file that takes a newcomer from zero to
"I know where things live and how the main flows run" in one sitting.
1. Resolve the output directory
Same per-installer configuration as this plugin's other guide skills:
${CLAUDE_PLUGIN_ROOT}/config.json → outputDir (shared across this plugin's skills)
config.json next to this SKILL.md → outputDir (skill-level override)
- Neither exists → read config.example.json for the
shape, ask the user for a real absolute path, then write the skill-level
config.json (git-ignored).
Honor openAfterGenerate (default true).
2. Confirm the target
Confirm which repository (and, for a monorepo, which package/area) the guide
covers, and who it's for (new engineer on the team vs. external contributor) —
that decides how much project-specific context to assume. Default: the whole
current repo, for a new team engineer.
3. Explore the codebase — the guide is only as true as this step
- Map the layout: top-level directories, build/config files, README/docs.
- Identify the architecture: layers/modules and the dependencies between them,
traced from real imports/references (Grep), not directory names alone.
- Trace 2–3 key flows end-to-end (e.g. a request from route → handler →
service → persistence; app startup; the primary user action). Record actual
file:line hops.
- Note conventions a newcomer must know: naming patterns, where tests live,
how config/env is loaded, codegen or other "don't edit by hand" areas.
- Completion criterion: every module in the architecture diagram and every hop
in a flow walkthrough is backed by a file you actually read.
4. Generate the HTML guide
One self-contained .html file: inline <style>, <script>, SVG — no CDN.
Prose in the user's conversation language; identifiers and paths as-is.
Sections, in order:
- Header — repo, purpose in one sentence, tech stack, date generated.
- Architecture diagram — inline SVG of layers/modules with dependency
arrows; a legend; each node listing its main directory.
- Directory map — collapsible tree of the significant directories, each
with a one-line role ("what lives here / when you'd touch it"). Skip
vendored/generated noise.
- Key flow walkthroughs — one per traced flow: a numbered sequence
diagram (SVG) plus a step table of file → function → what happens.
- Conventions & gotchas — the step-3 conventions list, including
anything marked "don't edit by hand".
- Recommended reading order — an ordered path of ~5–10 files to read
first, each with one line on why it's on the path.
- Getting started — real setup/build/test commands taken from the repo's
README or scripts, in copyable code blocks.
Interactivity: sticky table of contents, collapsible directory tree and flow
sections.
5. Save, open, report
- Filename:
<repo>-onboarding-<yyyyMMdd>.html in the resolved output
directory (create it if missing).
- If
openAfterGenerate, open it: start <path> (fall back to explorer.exe <path>).
- Report the saved path and which flows the guide walks through.
Failure modes
- Repo too large to trace honestly in one pass → scope the guide to the
agreed area from step 2 and say so in the header, rather than diluting the
whole repo into vagueness.
- No obvious key flows (pure library) → walk the public API surface and one
representative usage instead.
1---2name: create-onboarding-guide3description: Generate a self-contained HTML onboarding tour of a repository — architecture diagram, directory map, key flow walkthroughs, and a recommended reading order — for new team members. Use when the user wants onboarding material, asks for a codebase overview/architecture tour, or wants to explain a repo to someone new.4---56# Create Onboarding Guide78Produce one self-contained HTML file that takes a newcomer from zero to9"I know where things live and how the main flows run" in one sitting.1011## 1. Resolve the output directory1213Same per-installer configuration as this plugin's other guide skills:14151. `${CLAUDE_PLUGIN_ROOT}/config.json` → `outputDir` (shared across this plugin's skills)162. `config.json` next to this SKILL.md → `outputDir` (skill-level override)173. Neither exists → read [config.example.json](config.example.json) for the18 shape, ask the user for a real absolute path, then write the skill-level19 `config.json` (git-ignored).2021Honor `openAfterGenerate` (default `true`).2223## 2. Confirm the target2425Confirm which repository (and, for a monorepo, which package/area) the guide26covers, and who it's for (new engineer on the team vs. external contributor) —27that decides how much project-specific context to assume. Default: the whole28current repo, for a new team engineer.2930## 3. Explore the codebase — the guide is only as true as this step3132- Map the layout: top-level directories, build/config files, README/docs.33- Identify the architecture: layers/modules and the dependencies between them,34 traced from real imports/references (Grep), not directory names alone.35- Trace 2–3 **key flows** end-to-end (e.g. a request from route → handler →36 service → persistence; app startup; the primary user action). Record actual37 file:line hops.38- Note conventions a newcomer must know: naming patterns, where tests live,39 how config/env is loaded, codegen or other "don't edit by hand" areas.40- Completion criterion: every module in the architecture diagram and every hop41 in a flow walkthrough is backed by a file you actually read.4243## 4. Generate the HTML guide4445One self-contained `.html` file: inline `<style>`, `<script>`, SVG — no CDN.46Prose in the user's conversation language; identifiers and paths as-is.47Sections, in order:48491. **Header** — repo, purpose in one sentence, tech stack, date generated.502. **Architecture diagram** — inline SVG of layers/modules with dependency51 arrows; a legend; each node listing its main directory.523. **Directory map** — collapsible tree of the significant directories, each53 with a one-line role ("what lives here / when you'd touch it"). Skip54 vendored/generated noise.554. **Key flow walkthroughs** — one per traced flow: a numbered sequence56 diagram (SVG) plus a step table of file → function → what happens.575. **Conventions & gotchas** — the step-3 conventions list, including58 anything marked "don't edit by hand".596. **Recommended reading order** — an ordered path of ~5–10 files to read60 first, each with one line on why it's on the path.617. **Getting started** — real setup/build/test commands taken from the repo's62 README or scripts, in copyable code blocks.6364Interactivity: sticky table of contents, collapsible directory tree and flow65sections.6667## 5. Save, open, report6869- Filename: `<repo>-onboarding-<yyyyMMdd>.html` in the resolved output70 directory (create it if missing).71- If `openAfterGenerate`, open it: `start <path>` (fall back to `explorer.exe <path>`).72- Report the saved path and which flows the guide walks through.7374## Failure modes7576- Repo too large to trace honestly in one pass → scope the guide to the77 agreed area from step 2 and say so in the header, rather than diluting the78 whole repo into vagueness.79- No obvious key flows (pure library) → walk the public API surface and one80 representative usage instead.