explain-code
Installation
SKILL.md
Explain Code
Workflow
- Start with an analogy — compare the code to something from everyday life
- Pick the right C4 level — match diagram depth to the question; default Level 2 (Container)
- Draw the diagram — render it as an ASCII box diagram directly in the response (no external tooling). Pick the C4 level per step 2, then build boxes/arrows with plain characters (
+ - | v ^ <- ->), keeping lines within ~80 columns so it stays readable in a terminal or chat window. Label each box with the component name (and a one-line responsibility if it fits), and label arrows with the action or event that flows along them. - Walk through the code — trace inputs to outputs in narrative form: what enters, which functions/modules touch it in order, where state changes, what exits. Name the data, not just the steps.
- Highlight a gotcha — what's a common mistake or misconception?
Keep explanations conversational. For complex concepts, use multiple analogies.