File Structure Overview
SKILL.md is a Markdown-format configuration file, typically containing these core sections:
Trigger Conditions
Trigger conditions tell Claude "when to use this Skill." They should be specific and recognizable.
Recommended phrasing
Use when the user asks to:
- Review code and generate a report
- Perform code review and produce a report
Use when the user mentions:
- "code review", "review this code", "help me check this code"
Avoid
- Too broad: "when the user needs help" — triggers almost always
- Too narrow: "when the user says exactly 'review'" — hard to match natural language
Capability Description
Briefly describe what the Skill can and cannot do to set correct expectations.
## Capability Scope
- Supports code review for Python, JavaScript, TypeScript
- Outputs structured report: issue list, severity, fix suggestions
- Does not run tests or deploy; static analysis only
Execution Steps
Steps are the Skill's "operations manual." They should be clear and executable.
## Execution Steps
Read the code snippet or file path provided by the user
Check along these dimensions:
- Logical correctness
- Code style and conventions
- Potential bugs and edge cases
- Performance and maintainability
For each issue, note: file, line number, severity, suggestion
Output a Markdown report with summary and detailed list
Examples
Examples significantly improve Claude's understanding. Include:
- Input example: How the user might phrase it, what they provide
- Output example: Expected format, length, style
## Examples
Input
User: Help me review this Python code
[Attached code snippet]
Output
Code Review Report
Summary
Found 3 issues: 1 high priority, 2 suggestions.
Detailed List
[High] Line 15: Unhandled division-by-zero exception...
[Suggestion] Line 8: Variable naming could be more descriptive...
Constraints and Notes
Define boundaries to avoid misuse or overuse.
## Constraints
- Recommended code size per review: under 500 lines
- Does not execute code or modify files; output report only
- For security audits, recommend using dedicated tools
Summary
A good SKILL.md has: clear trigger conditions, a concise capability description, executable steps, representative examples, and necessary constraints. Following these conventions improves Skill usability and stability.