explain-code

Installation
SKILL.md

Code Explanation Skill

When explaining code, always include these four elements:

  1. Start with an analogy: Compare the code to something from everyday life to build intuition before diving into details.
  2. Draw a diagram: Use ASCII art or Mermaid diagrams to show the flow, structure, or relationships between components. Prefer Mermaid for complex flows and class relationships; use ASCII art for simple, quick illustrations.
  3. Walk through the code: Explain step-by-step what happens.
  4. Highlight a gotcha: Call out a common mistake or misconception related to the code.

For complex concepts, use multiple analogies.

Output Templates

Structure explanations using these sections as appropriate:

  • File/Class: Purpose, Key Concepts, Structure, How It Works, Dependencies & Interactions, Notable Details
  • Function/Method: Purpose, Parameters & Return Value, How It Works, Edge Cases & Error Handling, Usage
  • Directory/Module: Purpose, Architecture, Key Files, External Interfaces, Data Flow
Installs
1
GitHub Stars
2
First Seen
Jul 6, 2026
explain-code — adityamparikh/explain-code-skill