AI
Learning Studio
Claude Skills2026-03-172 min read

SKILL.md Format Guide

Deep dive into SKILL.md structure, fields, and writing conventions

SKILL.mdFormat SpecificationSkill WritingTake NoteMark Doubt

File Structure Overview

SKILL.md is a Markdown-format configuration file, typically containing these core sections:

  • Trigger conditions (Trigger)
  • Capability description (Capabilities)
  • Execution steps or workflow (Steps / Workflow)
  • Examples (Examples)
  • Constraints and notes (Constraints)
  • 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.

    Flash Cards

    Question

    How should trigger conditions typically be phrased in SKILL.md?

    Click to flip

    Answer

    Use phrases like 'Use when...' or 'Use when the user...' to clearly describe user intent, keywords, or scenarios so Claude can accurately decide when to load the Skill.

    Question

    Why provide input/output examples in a Skill?

    Click to flip

    Answer

    Examples help Claude understand expected format, style, and depth, reduce ambiguity, and improve output quality and consistency.

    Question

    How should the 'Steps' section of a Skill be written?

    Click to flip

    Answer

    Steps should be clear and executable. List specific actions or checkpoints in order. Avoid vague descriptions so Claude can follow and self-check.