Skip to main content
The YAML frontmatter in SKILL.md contains metadata that controls skill discovery and triggering. This page documents the complete schema.

Schema Overview

The frontmatter uses YAML syntax and must be enclosed in --- delimiters at the top of the SKILL.md file:

Required Fields

name

string
required
Unique identifier for the skill.Format:
  • Lowercase letters, numbers, and hyphens only
  • No spaces or special characters
  • Should be descriptive and memorable
Examples:
Usage:
  • Used as the skill’s identifier in skill loading systems
  • Appears in skill lists and management interfaces
  • Should match the skill folder name by convention

description

string
required
Complete description of what the skill does and when to use it.Purpose:
  • Primary triggering mechanism - AI agents use this to decide when to invoke the skill
  • All “when to use” information should be in the description, not the body
  • Should be comprehensive but concise (~50-200 words)
Best Practices:
  1. Include both capabilities and contexts:
  2. Be “pushy” to combat under-triggering: Agents tend to under-use skills, so make the description explicitly mention when to use it: Less effective:
    Better:
  3. List specific trigger keywords and scenarios:
  4. Mention file types, frameworks, or domains:

Optional Fields

compatibility

string | array
Required tools, dependencies, or platform requirements.When to use:
  • Skill requires specific tools (e.g., WebFetch, specific CLI tools)
  • Skill has platform dependencies (e.g., only works on Linux)
  • Skill needs external services or credentials
Examples:Single requirement:
Multiple requirements:
The compatibility field is rarely needed. Most skills work across platforms and don’t have special requirements.

license

string
License information for the skill.Formats:Direct license name:
Reference to license file:
Custom license:
Common Licenses:
  • Apache 2.0 - Open source, permissive
  • MIT - Open source, very permissive
  • Source available - Code visible but restricted use
  • Proprietary - Closed source

Complete Schema Example

Description Optimization

Since the description field is the primary triggering mechanism, optimizing it is crucial for skill effectiveness.

How Triggering Works

Skills appear in the agent’s available_skills list with their name and description. The agent decides whether to use a skill based on:
  1. Match between user request and description - Keywords, concepts, contexts
  2. Task complexity - Simple one-step tasks may not trigger skills even if description matches
  3. Agent capability - Agent only triggers skills for tasks where the skill provides value
Simple queries like “read this PDF” may not trigger a PDF skill even if the description matches perfectly, because the agent can handle them directly with basic tools. Complex, multi-step, or specialized queries reliably trigger skills when the description matches.

Testing Trigger Accuracy

The skill-creator skill includes a description optimization system that:
  1. Generates 20 test queries (mix of should-trigger and should-not-trigger)
  2. Evaluates current description’s trigger accuracy
  3. Uses extended thinking to propose improvements
  4. Iteratively refines the description
  5. Reports final accuracy on held-out test set
See the Creating Skills guide for details on description optimization.

Description Anti-Patterns

Problem:
Better:
Problem:
Better:
Notice the addition of: “MCP”, “Model Context Protocol”, “external services”, “APIs”, “Python”, “FastMCP”, “Node”, “TypeScript”, “MCP SDK”
Problem:
Better:
Problem:
Better:

Validation

While there’s no formal schema validator, you can check your frontmatter:

Required Fields Check

Format Check

  • Frontmatter must start with --- on line 1
  • Frontmatter must end with --- before the markdown body
  • Each field must be on its own line
  • Field names must be lowercase
  • Values should be properly quoted if they contain special characters

Common Mistakes

Frontmatter not at the start: The YAML frontmatter must be the very first thing in the file. No blank lines or comments before the opening ---.
Invalid YAML syntax:
Missing required fields: Both name and description are required. Skills without these fields may fail to load.

Next Steps

SKILL.md Format

Learn about the full SKILL.md structure

Loading System

Understand how skills are loaded progressively

Creating Skills

Build your first skill with best practices