/explain Skill
Explain code clearly with structured breakdowns.
Usage
- •
/explain src/auth/middleware.ts— explain a file - •
/explain handleAuth— explain a function - •
/explain— explain the current context / recent changes
Steps
- •Read the target file or find the target function
- •Identify the purpose and context (what system it's part of)
- •Break down the logic step by step
- •Identify key patterns and design decisions
- •Note any dependencies or side effects
Output Format
Overview
One paragraph explaining what this code does and why it exists.
How It Works
Step-by-step walkthrough of the logic, referencing line numbers.
Key Concepts
- •Important patterns or abstractions used
- •Non-obvious design decisions
Data Flow
Describe how data enters, transforms, and exits.
Dependencies
- •What this code depends on
- •What depends on this code
Gotchas
- •Edge cases to be aware of
- •Common mistakes when modifying this code