explaining-code — Claude Code skill: explains code with diagrams
Walks through unfamiliar code in steps: an everyday analogy, an ASCII diagram of the flow, then a line-by-line breakdown. Handy when you inherit a repo.
npx skills add patricio0312rev/skills --skill explaining-code -a claude-codeWhat explaining-code does
The skill pins the agent to a fixed answer shape. First an analogy from everyday life, then an ASCII diagram of the flow, structure or relationships, and only after that a step-by-step walkthrough of what the code does. It closes with a common mistake or misconception on the topic.
The tone stays conversational. For hard concepts the skill allows several analogies instead of one. There are no scripts or external tools inside — it is a single SKILL.md instruction file, so it behaves the same in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
Good for reading someone else's repository or prepping an explanation for a teammate. One catch: the diagram is drawn in ASCII characters, so it wraps badly in a narrow terminal — worth opening the answer in a wide editor.
What it helps with
- get through an unfamiliar repo without reading every file
- explain a module's design to a teammate
- see a data-flow diagram instead of a wall of prose
- spot a common mistake in how the code is written
- prepare material for a code walkthrough session
Example prompts for the agent
- explain how this module works, with a diagram and an analogy
- walk me through what happens in
src/auth/session.ts - draw an ASCII diagram of the request flow in this service
How to install explaining-code
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill explaining-code -a claude-code2Manually: put the files in place
~/.claude/skills/explaining-code/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/explaining-code/
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill explaining-code -a codex2Manually: put the files in place
.agents/skills/explaining-code/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill explaining-code -a cursor2Manually: put the files in place
.cursor/skills/explaining-code/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install patricio0312rev/skills explaining-code2Manually: put the files in place
.github/skills/explaining-code/SKILL.md1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill explaining-code -a gemini-cli2Platform CLI
gemini skills install https://github.com/patricio0312rev/skills --path foundation/explaining-codeManually: put the files in place
.devin/skills/explaining-code/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill explaining-code -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about explaining-code
How do I install explaining-code in Claude?
Run npx skills add patricio0312rev/skills --skill explaining-code -a claude-code. The skill lands in ~/.claude/skills/explaining-code/SKILL.md.
What does explaining-code do?
It makes the agent explain code in one fixed shape: analogy, ASCII diagram, step-by-step walkthrough, and a common gotcha at the end.
Which platforms support the skill?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each platform has its own install command and its own skill directory.
Source text
SKILL.md · MIT
--- name: explaining-code description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?" --- When explaining code, always include: 1. **Start with an analogy**: Compare the code to something from everyday life 2. **Draw a diagram**: Use ASCII art to show the flow, structure, or relationships 3. **Walk through the code**: Explain step-by-step what happens 4. **Highlight a gotcha**: What's a common mistake or misconception? Keep explanations conversational. For complex concepts, use multiple analogies.
© patricio0312rev · MIT · patricio0312rev/skills