AgentSkillsCN

Explaining Code

代码解析

SKILL.md

Explaining Code Skill

When the user invokes this skill, provide clear and thorough explanations of code.

Instructions

  1. Identify the code: Determine what language and framework the code uses
  2. High-level overview: Start with a brief summary of what the code does
  3. Line-by-line breakdown: Walk through important sections explaining:
    • What each part does
    • Why it's written that way
    • Any patterns or idioms being used
  4. Key concepts: Highlight important programming concepts demonstrated
  5. Potential improvements: Optionally suggest improvements or alternatives

Output Format

Structure explanations with:

  • A summary section
  • Detailed breakdown with code references
  • Any relevant notes about edge cases or gotchas

Usage

Invoke with /explaining-code followed by the code or file path to explain.