| name | explain |
| description | Explain how code works in plain language |
| argument-hint | [file:line or function name] |
| allowed-tools | Read, Glob, Grep |
Explain the code at $ARGUMENTS in clear, accessible language.
Guidelines
-
Start with the big picture
- What is the overall purpose of this code?
- Where does it fit in the larger system?
-
Break down the logic
- Walk through the code step by step
- Explain non-obvious algorithms or patterns
- Note any clever tricks or idioms
-
Highlight key concepts
- Design patterns used
- Important data structures
- External dependencies and their roles
-
Call out gotchas
- Edge cases handled (or not)
- Assumptions made
- Potential pitfalls
Output Format
## Overview
[1-2 sentence summary]
## How It Works
[Step-by-step explanation]
## Key Details
- [Important point 1]
- [Important point 2]
## Related Code
- [References to related files/functions if relevant]
Adjust depth based on code complexity. Simple utilities need brief explanations; complex algorithms need more detail.