/ceh-codebase-explanation:explain-until-understood [what to explain]from ceh-codebase-explanation
Load this skill when someone in the session must understand a subsystem, design, diff, or tool: explain from zero until they can answer unaided. Trigger on "explain this to me", "I don't understand this diff". Not for a repo-wide file (use ceh-codebase-explanation:explain-codebase).
Ships in ceh-codebase-explanation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The target is a reader who can answer questions about the system without the explanation in front of them — not a reader who followed along. Following along is the failure mode that feels like success, on both sides.
The output is the conversation. By default this skill writes no files; the exceptions, each on request, are in Output below.
Assume the reader is new here and knows nothing about the subject. Not that they are inexperienced — that it is their first day on this project. They have never seen this repo, this tool, or the work that led to it, and they do not know the words any of it uses.
Project-local names are terms of art like any other, and get defined at first use: a service, a table, an internal acronym, a file everyone refers to by a nickname.
The cost is asymmetric, and that is the whole argument. Explaining above someone burns a full round trip, and they may not say they are lost. Explaining below someone costs one paragraph they skim in three seconds.
State the floor you are building from in one line before you start — "assuming you have written Python but never used asyncio" — so the reader can raise it. Then build strictly upward from it.
Scale to the ask. The full eight-step procedure is for something the reader has to hold in their head afterwards — a subsystem, a design, a release's worth of change.
Step 1 is what you do. Steps 2 and 4–8 are what the reply contains, in that order. Step 3 is both: you run the command, and its output goes in the reply next to the claim it supports.
Do not narrate the doing. "I read the modules and ran the validator" is process, and the reader asked for an explanation. Pasted output is evidence, not narration.
Read the real thing first. Never explain from memory, from a design doc, or from a summary — including a design doc you wrote yourself earlier in the session. A design doc says what the author decided; the source says what is true today.
What "the real thing" is follows the ask:
<tag>" — the diff. Commit messages come after it and are labelled as
claimed intent, never the changelog.--help, plus one run against a real fixture, read-only per
step 3. A tool with no read-only run is read, not run: say so, and mark its behavior
unverified.The ban covers the subject only. A step 2 foundation may come from your own knowledge — say plainly that it does. If the subject has an artifact you cannot reach, say so before explaining anything, and mark every claim that follows as unverified. A subject with no artifact to reach in the first place — a protocol, a general technique — is a different case: say once that it comes from knowledge, and do not label every line.
Establish foundations before the specific case. Name the two to four ideas the whole explanation rests on, and state each one plainly before you use it.
Everything after this step stands on these. A foundation that missed makes the rest unreadable rather than partly readable, which is the single most common cause of an explanation that has to be repeated. You do not stop mid-reply to check: aim step 8's first self-test question at a foundation, which is where a missed one surfaces cheapest.
Verify by running. Run the tool, the command, the throwaway script, and paste the real output. "semgrep found 2 hits, lines 22 and 23–27" beats "semgrep would flag the network call."
Draw structure and time; write everything else. Prose is bad at nesting, ordering, before/after, and data flow. Use a picture for those and a table or list for the rest — a diagram of a list is noise.
- | + / \ < > ^ v for lines
and arrowheads, [ ] or +---+ for boxes. No box-drawing glyphs, no →, no emoji — those
depend on the reader's font and terminal encoding, and one glyph that fails to render turns the
picture into noise exactly where the picture was carrying the meaning.request --> [ router ] --+--> [ handler A ] --> db
|
+--> [ handler B ] --> queue
Walk one concrete case, numbered, end to end. Take a single real input — one request, one file, one commit — and number what happens to it, one hop per line, with the real names and the real values.
This is the default form, not a fallback: prefer a walked case over a general description wherever a concrete case exists. A reader who cannot follow the general rule can almost always follow one worked case, and then read the rule back off it.
Frame failure as "what you would wrongly conclude". Not "this is a bug" but "you would read that as reconcile routing to verdict, and go debug the rule ladder — and the rule ladder is fine." The wrong conclusion is what makes a subtle failure memorable.
The step frames a failure the code actually has. If reading it turned up none, say the path is straightforward and move on — an invented failure mode breaks the evidence rule.
Show the tempting-but-wrong alternative. For any non-obvious design, name the simpler thing a reader would reach for and show precisely where it breaks. This is what turns "the code does X" into "the code must do X".
Close with the transferable rule, then a self-test. One sentence the reader can apply to the next case — "pass context explicitly wherever someone else's scheduler owns the task" beats re-listing the three call sites where it is passed. Follow it with two to five questions they should now be able to answer unaided.
First ask what kind of miss it was, because three of the four are not ladder moves:
Do not restate the same explanation with more words. Drop a level and change the representation.
Only the representation changes. A re-explanation still closes on step 8's rule and self-test, pitched at the scale the first attempt was — one question is enough for a small ask — because the self-test is how you find out whether the new form landed.
Locate yourself on the ladder by the form of the last attempt, not by how many messages have passed. Invoked cold after a miss, look at what the previous explanation actually was and take the next row down.
| Attempt | Representation | If it still misses |
|---|---|---|
| 1 | prose, tables, and code references | go to step-by-step |
| 2 | numbered steps, one idea each | go to pictures |
| 3 | one ASCII diagram per step | stop adding pictures — go to attempt 4 |
| 4 | define the foundations, then rebuild the explanation on them | ask which sentence broke |
A miss at attempt 3 is almost never a missing detail. It is a foundation the first three attempts all assumed. Go back to step 2 rather than adding more pictures.
The register of the explanation is a choice, and the default drifts technical because the source material is technical. Steer it deliberately.
async means here." The reverse order
lets the name stand in for the idea, and the reader nods at a word.422, SIGTERM,
the actual function name); those stay verbatim, like the literals in Rules.Say what you checked and what you did not, and never present a guess as fact. One addition specific to explaining:
"Not documented" and "I did not check" are different answers. "Not documented" is a claim, and only a grep earns it; with no grep the honest answer is "I did not check". Report which of the two you are giving. The same holds for "this path was never verified end to end" — often the single most valuable line in the whole explanation.
+, -, | and --> would have rendered anywhere.Explaining slides naturally into writing it down. Keep the boundary explicit:
.agents_workspace/ are in scope when the user asks for something to
re-read later.docs/, README, architecture notes — is a different job.
Hand off to the skill that owns it (see Hands off to) rather than writing it here.docs/. It is neither a whole-repo orientation file, nor product documentation, nor a decision
record. Say that plainly instead of forcing a fit — ceh-codebase-explanation:document-architecture is
the nearest, and it will reshape the material into diagrams plus Key Decisions rather than
preserve the explanation you just gave. Having named the gap, write the file yourself if the user
still wants it, keeping the explanation's shape. This is the one repo path this skill may write.Opt-in only. Keep one file per subject at .agents_workspace/product/learning/<subject>.yaml, so a later
session starts from what the reader already knows instead of from zero. A new file is a copy of
assets/learning.template.yaml, per the learning/v2 section of references/learning-schema.md.
Before reading a saved <subject>.yaml, run
uv run --script ${CLAUDE_SKILL_DIR}/scripts/artifact.py check <subject>.yaml. On exit 1, stop and
report its errors, unless the only error is a stale .md, which the same command with render
repairs. On exit 2 or 3, without uv, or when the command is denied, say that the record went
unchecked, and read it anyway.
After each edit, run uv run --script ${CLAUDE_SKILL_DIR}/scripts/artifact.py render <subject>.yaml,
which writes the .md beside it in the layout of assets/learning.template.md, and fix the YAML
for each error it lists. Never edit the generated .md. A <subject>.md with no YAML beside it
is a learning/v1 file, edited in place. On exit 2 or 3, or without uv, say in the reply that the
file went unchecked and unrendered.
check and stop on exit 1 with its errors, then read the file
before explaining anything. Ask two Self-test questions first, the
missed ones before the oldest, and record each answer. A term the reader cannot use unaided goes
back into the next explanation as a foundation, not as review.| Want | Use |
|---|---|
| A repo-wide orientation file, component by component | ceh-codebase-explanation:explain-codebase |
| Diagrams and decision records that live in the repo | ceh-codebase-explanation:document-architecture |
| Docs for people who use or operate the product | ceh-documentation:write-guides-and-runbooks for the tasks, ceh-documentation:write-project-docs for a whole docs set |
| Someone in this session needs to understand something now | this skill |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cheneeheng/ceh-claude-code-library --plugin ceh-codebase-explanation5 skills in this plugin
/document-architectureLoad this skill when creating or updating ARCHITECTURE.yaml (Mermaid diagrams plus a Key Decisions log), or when a change to the system's shape must be brought back into it. Trigger on "write the architecture doc", "diagram the system", "record this decision", "high-level overview"./explain-codebaseLoad this skill when a whole repo or knowledge base must be understood and the understanding written to .agents_workspace/CODEBASE_EXPLAINED.md, component by component. Trigger on "explain this codebase", "walk me through this project", "I inherited this repo"./Other plugins' skills for the same job