explaining-codebases skill
Generates interactive explainers for codebases, including architecture maps, data-flow diagrams, and annotated code walkthroughs.
- GitHub stars
- 22
- Files
- 4
- Last commit
- Oct 26, 2026
- License
- MIT
- Allowed tools
- —
What does the explaining-codebases skill do?
explaining-codebases generates interactive explainers for codebases, including architecture maps, data-flow diagrams, and annotated code walkthroughs.
Summary generated from the skill's SKILL.md.
About the explaining-codebases skill
Developers needing to onboard new contributors or understand complex repositories can use this skill to generate interactive documentation. It transforms actual source files, services, or repositories into self-contained interactive explainers that include architecture maps, data-flow diagrams, and annotated code walkthroughs. An agent should load this skill when a user asks to visualize an architecture or walk through how a specific mechanism works within a codebase.
The process relies on navigating real code to identify entry points, module structures, and the spine concept of a feature. It produces high-fidelity outputs like execution-trace steppers and sequence diagrams that show how items move through different stages. To ensure accuracy, the skill requires running fact-checking-explainers to verify that every quoted snippet and functional claim matches the implementation at a specific path and line. It works in tandem with creating-explainers to handle the final HTML templates, prose, and polish.
What an agent can do with it
- 1Onboarding new team membersCreate an architecture overview that shows how modules and key abstractions fit together in a new project.
- 2Deep-diving into specific algorithmsGenerate an execution-trace stepper to walk through a single algorithm with state and highlighted lines.
- 3Visualizing data movementProduce a sequence diagram to illustrate how a request or message moves through various stages of a system.
- 4Verifying code documentation accuracyEnsure all code snippets and functional claims in an explainer match the current implementation.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the explaining-codebases skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the explaining-codebases skill in Plugin
/plugin marketplace add analyticalmonk/explain-this /plugin install explain-this@explain-this
Install the explaining-codebases skill in Claude Code
~/.claude/skills/explaining-codebases/SKILL.md
$ npx degit analyticalmonk/explain-this/skills/explaining-codebases ~/.claude/skills/explaining-codebasesInstall the explaining-codebases skill in Claude Code (project)
.claude/skills/explaining-codebases/SKILL.md
$ npx degit analyticalmonk/explain-this/skills/explaining-codebases .claude/skills/explaining-codebasesInstall the explaining-codebases skill in Codex
~/.agents/skills/explaining-codebases/SKILL.md
$ npx degit analyticalmonk/explain-this/skills/explaining-codebases ~/.agents/skills/explaining-codebasesInstall the explaining-codebases skill in Gemini CLI
~/.gemini/skills/explaining-codebases/SKILL.md
$ npx degit analyticalmonk/explain-this/skills/explaining-codebases ~/.gemini/skills/explaining-codebasesInstall the explaining-codebases skill in Claude.ai
npx degit analyticalmonk/explain-this/skills/explaining-codebases explaining-codebases && zip -r explaining-codebases.zip explaining-codebases # claude.ai → Customize → Skills → + → Create skill → Upload a skill → explaining-codebases.zip
SKILL.md
View on GitHubExplaining Codebases
Overview
This skill explains code as it actually exists - a repository, a service, or a set of source files. The output is the same distill-style, single self-contained interactive explainer that creating-explainers produces. What differs is the intake (navigating real code instead of reading a paper) and the figure types (architecture diagrams, data-flow, execution traces, annotated code walkthroughs). It handles both onboarding overviews of a whole codebase and deep-dives on one mechanism.
Required Background
REQUIRED: Use creating-explainers for everything about the output - the HTML template, voice and style, base figure archetypes, color palettes, the outline/scaffold/prose/polish workflow, and the quality checklist. This skill only adds what is specific to code. Do not duplicate that material here.
When to Use
Use when the subject is code:
- Architecture / onboarding overview - how a project is structured: its modules, how data flows between them, the key abstractions, how the pieces fit. For a new contributor who needs the map.
- Single-mechanism deep-dive - how one algorithm, feature, or subsystem works, traced through the real implementation.
The skill picks the angle from the request and confirms it with the user during intake (overview and deep-dive want different figures and different depth).
When NOT to use: a paper, a topic, or any non-code source. Use creating-explainers instead.
Code Intake
See references/code-intake.md. In short: pick the angle, navigate the repository to find entry points and module structure, identify the spine concept (the one path or idea the article tracks), map the architecture, and pull real code snippets anchored to path:line. Quote actual code; never paraphrase code as if quoting it.
Code-Specific Figures
See references/code-figure-archetypes.md for the patterns:
- Architecture / module diagram - modules as boxes, dependencies as arrows
- Data-flow / sequence diagram - an item (request, message, token) moving through stages
- Execution-trace stepper - step through an algorithm with state and the current line highlighted
- Annotated code walkthrough - a code block whose lines reveal annotations as you step or hover
The mechanics (DPR-aware initCanvas, the IIFE pattern, animation loops) come from the base figure-archetypes.md in creating-explainers. The code-figure reference only covers how to apply them to code.
The Fact-Check Gate for Code
REQUIRED before delivery: run fact-checking-explainers. For a codebase explainer the source of truth is the code itself. Every claim about what the code does, and every quoted snippet, is checked against the actual implementation at a specific path and line. Code drifts; a snippet that was accurate yesterday may be wrong today. The interactive explainer is not done until it passes.
Workflow
Same staged workflow as creating-explainers, with code intake in place of the text intakes:
1. Code intake -> navigate, pick angle, find the spine, map architecture, pull real snippets
2. Outline -> propose sections + figure list, get user approval
3. Scaffold -> copy the article template, fill metadata
4. Prose pass -> write all sections with figure placeholders
5. Figures pass -> implement each interactive figure
6. Post-draft fact-check -> verify every claim and snippet against the real code (REQUIRED, blocking)
7. Polish -> run the creating-explainers Quality Checklist to completion
Pause for user approval after the outline. Everything about scaffolding, prose, figures, polish, and the delivery checklist follows creating-explainers.
Common Mistakes
| Mistake | Fix |
|---|---|
| Explaining code that does not exist, or that you imagined | Open the files. Every claim traces to real code at a real path. |
| Snippets drift from the real source | Quote exactly, with path:line. Never tidy code into something the repo does not contain. |
| Architecture diagram does not match the real module structure | Build the diagram from the actual imports and call sites, not a guess. |
| Scope too broad (a whole framework in one article) | Pick one subsystem or one mechanism. Breadth dilutes; depth teaches. |
| Pasting a huge file as a "figure" | Figures illustrate a point the prose just set up. Trim to the lines that matter. |
Files in this skill
4explaining-codebases skill questions
How do I install the explaining-codebases skill in Claude Code?
Run npx degit analyticalmonk/explain-this/skills/explaining-codebases ~/.claude/skills/explaining-codebases. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the explaining-codebases skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How does the skill ensure the code explanations are accurate?
The skill requires a mandatory fact-checking step where every claim and code snippet is verified against the actual implementation at a specific path and line.
When should I not use this skill?
Do not use this skill for papers, general topics, or any non-code sources; use the creating-explainers skill instead.