explain-code
/explain-code
Explain code to a beginner in that stack — either a module walkthrough (what each function does, how calls link, where data flows, which patterns recur) or a commit teach-in (why each file changed, what changed, blast radius, what would break if it were left out). Use when asked to explain code, walk through a directory, or explain the last commit.
- Author
- renzrollon ↗
- Repository
- interlock ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Explain code to a beginner in that stack — either a module walkthrough (what each function does, how calls link, where data flows, which patterns recur) or a commit teach-in (why each file changed, what changed, blast radius, what would break if it were left out). Use when asked to explain code, walk through a directory, or explain the last commit.
Arguments
/explain-code [path | --commit | --commits N]
Original author description
Explain code to a beginner in that stack — either a module walkthrough (what each function does, how calls link, where data flows, which patterns recur) or a commit teach-in (why each file changed, what changed, blast radius, what would break if it were left out). Use when asked to explain code, walk through a directory, or explain the last commit.
How it works
- Modes
- Output path
- Shared rules
SKILL.md preview
---
name: explain-code
description: Explain code to a beginner in that stack — either a module walkthrough (what each function does, how calls link, where data flows, which patterns recur) or a commit teach-in (why each file changed, what changed, blast radius, what would break if it were left out). Use when asked to explain code, walk through a directory, or explain the last commit.
license: MIT
compatibility: Requires git for commit teach-in mode. Optional openspec CLI for change scoping.
argument-hint: "[path | --commit | --commits N]"
allowed-tools: Bash(git *) Bash(interlock-graph *) Bash(openspec *) Read Write Grep Glob
metadata:
type: teaching
---
Teach code to someone new to this stack. **Not reviewing, not judging — teaching.**
Calibrate to a reader who knows programming fundamentals but is new to this project's language and framework. Explain the idioms that stack takes for granted, one short aside each. Do not explain what a function is.
## Modes
| Mode | When | Load |
|------|------|------|
| **Module walkthrough** (default) | A file or directory is named, or the user asks how an area works | `${CLAUDE_SKILL_DIR}/module-walkthrough.md` |
| **Commit teach-in** | Last commit, a hash or range, "what changed", `--commit` / `--commits N` | `${CLAUDE_SKILL_DIR}/commit-teachin.md` |
When ambiguous, prefer the module walkthrough unless the user mentioned a commit or "what changed".
**After choosing a mode, read the matching sibling file and follow it** for steps, structure, and output format. This file only routes.
## Output path
Resolve the destination before writing. Both modes use the same rule:
| Situation | Write to |
|---|---|
| Scoped to an OpenSpec change — a change name was passed, or one resolves via `openspec status --json` | `openspec/changes/<change-name>/code-explanation.md` |
| No change context (ad-hoc walkthrough) | `docs/CODE_EXPLANATION.md` |
**Do not "simplify" this back to a single path.** A change-scoped explanation belongs beside `manual-test-plan.md` in its own change directory. Writing every run to `docs/CODE_EXPLANATION.md` overwrites the previous change's explanation — and because `docs/` is the corpus `/interlock:docs-digest` indexes, each rewrite permanently marks `.claude/graph/DOCS_DIGEST.md` stale through its `source_hashes`.
## Shared rules
- **Single agent, no fan-out.** Understanding builds sequentially; parallel investigators produce four disconnected fragments, which is the opposite of a walkthrough.
- Write the full explanation to the resolved path (overwrite), then tell the user the file is ready with a 5–10 line summary.
- Pull domain context on demand: `.claude/graph/DOCS_DIGEST.md` first, then `interlock-graph context` / `docs`. Never preload all of `docs/` — see `${CLAUDE_PLUGIN_ROOT}/shared/TOOL-ECONOMY.md` Rule 0.5.
Files in this package (3)
- SKILL.md 3 KB
- commit-teachin.md 7 KB
- module-walkthrough.md 16 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · renzrollon/interlock | 90 | MIT |
| tojim00d/Orbit-skills | 100 | MIT |
| viknesh20-20/claude-code-tool-kit | 100 | MIT |
| Reevias/Prometheus- | 90 | MIT |
| dmzoneill/skills | 90 | Apache-2.0 |
| electronx/wiredkits-free | 90 | MIT |
Database snapshot: 13.11.2026 · package version 7154b1b087fb (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90rpi-explain
Walk through a recent diff and explain what changed and why, focusing on non-obvious decisions. Use when user says 'explain the changes', 'walk me through the diff', 'what did we just do?', or 'explain how <feature> was implemented'. - 90rpi-explain
Walk through a recent diff and explain what changed and why, focusing on non-obvious decisions. Use when user says 'explain the changes', 'walk me through the diff', 'what did we just do?', or 'explain how <feature> was implemented'. - 100explain-tests
Explain test code changes as a side-by-side HTML page — real test code on the left, a short note on the right saying which case that code covers. Use for reviewing or understanding newly added/changed tests in a commit, revision range, PR, or working copy. Triggers:… - 100explain
Use when user invokes /explain with a file path, directory path, function/class name, or natural language concept. Also triggers on "explain this", "how does X work", "walk me through". Produces a structured, layered explanation of what the code does, how it connects, and where… - 90ctx-explain
Explain code for someone new to the project. Use when the user asks 'what does this do', 'explain this', or wants to understand unfamiliar code. - 95pragma-walkthrough
Explain code you wrote or changed, or what a commit did, as an interactive step-by-step walkthrough in Pragma ADE's Walkthrough tab, published with `pragma walkthrough publish`. Use when working inside Pragma ADE and the user asks to understand or review code, e.g. "explain what…