Code Explainer
Explain code in simple terms that anyone can understand.
When to Use
Use this skill when the user asks to:
- •Explain code
- •Understand what code does
- •Break down a function or file
- •Learn how something works
Instructions
- •If the user provides a file path, use
read_fileto get the contents - •Break down the code into logical sections
- •Explain each section in plain English
- •Avoid jargon - use simple analogies when helpful
- •Highlight:
- •What the code does (purpose)
- •How it works (mechanism)
- •Why it matters (context)
Explanation Structure
- •Overview: One sentence summary of what the code does
- •Step-by-step: Walk through the logic
- •Key concepts: Explain any important patterns or techniques
- •Summary: Recap the main points
Guidelines
- •Use analogies to explain complex concepts
- •Point out common patterns (loops, conditionals, etc.)
- •Mention potential edge cases or gotchas
- •Keep explanations concise but complete
Example
User: "Explain the code in src/utils.ts"
- •Read the file with
read_file - •Provide overview
- •Explain each function/section
- •Summarize key takeaways