codebase-explainer
Skill0 starsChanged 5 months agoMITView on GitHub
Turn a codebase into an onboarding playlist — Claude-authored analysis docs plus NotebookLM explainer videos (one overview + one per subsystem). Use when asked to explain a codebase, onboard onto a repo, make explainer/walkthrough videos of the code, or 'help me understand how this whole thing works'.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- milad-ahmd/agent-skillstheir own version, first seen Nov 1, 2026
- bhaveyx/codebase-explainertheir own version, first seen Oct 25, 2026
- dennisrongo/claude-skillstheir own version, first seen Aug 16, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- milad-ahmd/agent-skills★ 5same name
- dennisrongo/claude-skills★ 1same name
- bhaveyx/codebase-explainer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-validationSkill
- architecture-scannerSkill
- auto-approve-policySkill
- auto-learningSkill
- backend-patternsSkill
- branch-syncSkill
- browser-testSkill
- browseSkill
- build-checkSkill
- cache-refreshSkill
- coding-standardsSkill
- commit-styleSkill
- context-switchingSkill
- continuous-learningSkill
- db-preflightSkill
- env-preflightSkill
- eval-harnessSkill
- feature-completenessSkill
- file-indexSkill
- frontend-patternsSkill
- function-extractSkill
- idev-initSkill
- import-graphSkill
- lessons-learnedSkill
- post-creation-verifySkill
- pre-ship-verifySkill
- project-mapSkill
- self-reviewSkill
- session-resumeSkill
- skill-benchmarkSkill
- skilloptSkill
- smart-contextSkill
- strategic-compactSkill
- task-journalSkill
- tdd-workflowSkill
- test-coverageSkill
- test-mapSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Run and read the JSON:
- Very specific: line 25
If ready is false, surface each messages line to the user (install / notebooklm login) and STOP until resolved.
- Very specific: line 30
Read existing idev caches first when present (they are a head start): .claude/idev/smart-context/index.json, …
- Very specific: line 66
If a subsystem positional argument was given in $ARGUMENTS, limit videos to the overview entry plus that one subsystem's entry only (still …
- Very specific: line 67
If few/no subsystems were detected (tiny repo, same as Stage 2), omit the per-subsystem NN-<subsystem>.md docs and include only the …
- Very specific: line 70
STOP. Tell the user the docs are in docs/onboarding/ and ask them to review/edit before any videos are generated.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Explainer
Produces an onboarding playlist for a repository: narration-friendly Markdown
docs plus NotebookLM explainer videos (one overview + one per subsystem).
Claude does the judgement stages (map, author docs); Python scripts do the
mechanical stages (preflight, build). Built on notebooklm-py via its CLI.
Outputs (in the target repo)
docs/onboarding/00-overview.md,NN-<subsystem>.md— analysis docsdocs/onboarding/videos/*.mp4— generated videosdocs/onboarding/index.md— playlist linking each doc → its video.claude/idev/codebase-explainer/plan.json— build plan (you author this).claude/idev/codebase-explainer/state.json— resumable progress
Stage 1 — Preflight
Run and read the JSON:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/codebase-explainer/preflight.py"If ready is false, surface each messages line to the user (install /
notebooklm login) and STOP until resolved. Auth is an interactive Google
login the user performs once.
Stage 2 — Map the codebase
Read existing idev caches first when present (they are a head start):
.claude/idev/smart-context/index.json, .claude/idev/project-map/project.map.md,
.claude/idev/architecture-scanner/cache.json. Then dispatch the
onboarding-guide agent to identify: tech stack, entry points, and the major
subsystems (name, purpose, boundary paths, key files, dependencies, primary
data flow). If few/no subsystems are detected (tiny repo), plan an overview
video only.
Stage 3 — Author docs + build plan
Write to docs/onboarding/:
00-overview.md— architecture, how the pieces fit, main end-to-end flows.NN-<subsystem>.md— one per subsystem: purpose, how it works, key files, dependencies, data flow. Write prose that explains concepts, not code dumps.
Then write .claude/idev/codebase-explainer/plan.json:
{
"style": "whiteboard",
"videos": [
{"key": "overview", "title": "Overview",
"notebook_name": "<repo> — Overview",
"sources": ["docs/onboarding/00-overview.md", "<1-2 key entry files>"],
"instructions": "Explain how this system works for a new developer: architecture and main flows.",
"output": "docs/onboarding/videos/00-overview.mp4",
"doc": "docs/onboarding/00-overview.md"},
{"key": "<subsystem-key>", "title": "<Subsystem>",
"notebook_name": "<repo> — <Subsystem>",
"sources": ["docs/onboarding/01-<subsystem>.md", "docs/onboarding/00-overview.md", "<key raw file>"],
"instructions": "Explain the <subsystem> for a new developer: responsibilities, key files, main data flow.",
"output": "docs/onboarding/videos/01-<subsystem>.mp4",
"doc": "docs/onboarding/01-<subsystem>.md"}
]
}sourcesare file paths (docs + a few key raw files for grounding — hybrid).styleapplies to every video for a consistent look; set it to the--style <visual-style>value from$ARGUMENTS(defaultwhiteboardif omitted).- If a
subsystempositional argument was given in$ARGUMENTS, limitvideosto the overview entry plus that one subsystem's entry only (still write the overview doc for context, but omit all other subsystem docs from plan.json). - If few/no subsystems were detected (tiny repo, same as Stage 2), omit the per-subsystem
NN-<subsystem>.mddocs and include only the overview video in plan.json.
Stage 4 — CHECKPOINT (mandatory)
STOP. Tell the user the docs are in docs/onboarding/ and ask them to review/edit
before any videos are generated. Nothing has been sent to NotebookLM yet. Only
continue on explicit approval.
Stage 5 — Build & generate
python3 "${CLAUDE_PLUGIN_ROOT}/skills/codebase-explainer/build_videos.py" \
--plan .claude/idev/codebase-explainer/plan.json \
--state .claude/idev/codebase-explainer/state.json \
--index docs/onboarding/index.mdGenerates sequentially (overview first), polling and downloading each video.
On a failure (e.g. NotebookLM daily limit) it records progress and stops — tell
the user which videos remain and that re-running the same command resumes,
skipping completed videos. Report the final playlist at docs/onboarding/index.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

