YAML Frontmatter
The YAML frontmatter at the top of SKILL.md contains metadata that controls how Claude discovers, loads, and uses your skill.Required Fields
Every skill must include these two fields:name
A unique identifier for your skill using lowercase letters and hyphens.- Use lowercase only
- Separate words with hyphens (kebab-case)
- Keep it concise but descriptive
- Avoid generic names that might conflict with other skills
skill-creator- Creates and improves skillsmcp-builder- Builds MCP serversbrand-guidelines- Applies brand stylingwebapp-testing- Tests web applications
description
A comprehensive description of what the skill does and when to use it. This is the primary triggering mechanism.- Include both what the skill does and when to use it
- List specific keywords and contexts that should trigger the skill
- Be slightly “pushy” - skills tend to under-trigger rather than over-trigger
- Mention alternative phrasings users might use
- Keep it under 100 words but be comprehensive
Optional Fields
license
Specify the license or reference a LICENSE.txt file:license: Complete terms in LICENSE.txt- Reference external filelicense: Apache 2.0- Open sourcelicense: Proprietary. LICENSE.txt has complete terms- Closed source with details
Many skills in Anthropic’s repository use Apache 2.0 license. Document creation skills (docx, pdf, pptx, xlsx) are source-available but proprietary.
compatibility
List required tools, dependencies, or environment requirements (rarely needed):- Specific software versions are required
- The skill depends on external tools not commonly available
- Certain platforms or environments are needed
Complete Frontmatter Examples
Minimal Skill
Production Skill
Document Skill
Description Optimization
After creating a skill, you can optimize the description for better triggering accuracy using the skill-creator skill:1
Generate Test Queries
Create 20 evaluation queries - mix of should-trigger and should-not-trigger cases
2
Review with User
Present queries in an HTML interface for editing and validation
3
Run Optimization Loop
Automatically test descriptions and improve based on results
4
Apply Best Result
Update SKILL.md with the optimized description
How Skill Triggering Works
Understanding the triggering mechanism helps you write better descriptions:- Skills appear in available_skills list with their name + description
- Claude decides whether to consult a skill based on the description
- Simple tasks may not trigger skills even with perfect descriptions - Claude handles them directly
- Complex, multi-step, specialized tasks reliably trigger skills when the description matches
Frontmatter Validation
When creating a skill, validate your frontmatter:YAML Syntax
YAML Syntax
- Use
---to open and close the frontmatter block - Colon separates keys from values:
name: value - Quote values containing special characters:
description: "Use when: ..." - No tabs - use spaces for indentation
Required Fields Present
Required Fields Present
namemust be present and non-emptydescriptionmust be present and comprehensive- Both should appear exactly once
Name Format
Name Format
- Lowercase letters, numbers, and hyphens only
- No spaces or special characters
- Examples:
skill-creator,mcp-builder,brand-guidelines
Common Mistakes
Next Steps
Skill Structure
Learn how to organize your skill files
Best Practices
Guidelines for writing effective descriptions