Skip to main content
The SKILL.md file is the core of every skill. It contains YAML frontmatter with metadata and a markdown body with instructions that the AI agent will follow when the skill is active.

File Structure

A SKILL.md file has two parts:
  1. YAML Frontmatter - Metadata enclosed in --- delimiters
  2. Markdown Body - Instructions, examples, and guidelines

YAML Frontmatter

Required Fields

string
required
Unique identifier for the skill. Use lowercase letters, numbers, and hyphens. No spaces.
string
required
Complete description of what the skill does and when to use it. This is the primary triggering mechanism - include both capabilities and specific contexts for when to use the skill.The description should be “pushy” to combat Claude’s tendency to under-trigger skills. Include:
  • What the skill does
  • When to use it (specific contexts, keywords, scenarios)
  • What it enables

Optional Fields

string | array
Required tools, dependencies, or platform requirements. Rarely needed.
string
License information or reference to a LICENSE.txt file in the skill folder.

Markdown Body

The markdown body contains the instructions the AI agent will follow. This is where you teach the agent how to accomplish the skill’s task.

Structure Guidelines

The SKILL.md body should ideally be under 500 lines. If approaching this limit:
  • Move detailed documentation to reference files
  • Add clear pointers about when to read each reference
  • Use progressive disclosure to load details on demand
Example:
Modern AI agents benefit from understanding why things are important, not just what to do.Good:
Less effective:
Prefer imperative instructions for clarity:
Examples help agents understand expected input/output formats:
When referencing bundled resources, be explicit about when and how to use them:

Common Patterns

Defining Output Formats

Ensure all fields are present and properly formatted.

Conditional Instructions

Error Handling

Writing Style

Theory of Mind

Write instructions with an understanding of how AI agents think and work:
  • Agents benefit from context and reasoning
  • Agents can generalize from principles
  • Agents work better with “why” than rigid “always/never” rules
  • Agents can compose solutions from flexible guidelines

Generality vs. Specificity

Balance general principles with specific examples:

Avoiding Over-Specification

If you find yourself writing ALWAYS or NEVER in all caps frequently, consider whether you can explain the reasoning instead. Rigid structures work less well than flexible guidelines grounded in understanding.
Instead of:
Try:

Complete Example

Here’s a complete SKILL.md example:
<type>(<scope>): <description> [optional body] [optional footer]

Next Steps

Metadata Schema

Detailed schema reference for YAML frontmatter

Loading System

How the progressive disclosure system works