Skip to main content

Skill Structure

Every skill is a self-contained folder with a specific structure that enables progressive loading and efficient context management.

Basic Structure

At minimum, a skill requires only one file:
A complete skill with bundled resources follows this structure:

The SKILL.md File

The SKILL.md file is the heart of every skill. It consists of two parts:

1. YAML Frontmatter

The frontmatter contains metadata that controls skill loading and triggering:
Only name and description are required. The description is especially important as it’s the primary triggering mechanism.

2. Markdown Instructions

Below the frontmatter, write instructions in markdown that Claude will follow when the skill is active:
Keep SKILL.md under 500 lines. If approaching this limit, move content to reference files in the references/ directory with clear pointers from SKILL.md.

Real-World Example: skill-creator

Here’s how Anthropic’s skill-creator skill is organized:

Real-World Example: mcp-builder

The mcp-builder skill uses a leaner structure focused on reference documentation:
Notice how mcp-builder keeps SKILL.md concise (237 lines) by moving detailed implementation guides to separate reference files. This allows Claude to load only relevant documentation when needed.

Progressive Disclosure Pattern

Skills use a three-level loading system to optimize context usage:
1

Level 1: Metadata (Always Loaded)

The name and description fields are always in context (~100 words). Claude uses these to decide whether to trigger the skill.
2

Level 2: SKILL.md Body (Loaded on Trigger)

When Claude decides to use a skill, it loads the full SKILL.md content. Keep this under 500 lines for optimal performance.
3

Level 3: Bundled Resources (Loaded as Needed)

Scripts, references, and assets are loaded only when explicitly referenced. Scripts can execute without being loaded into context.

Domain Organization Pattern

When a skill supports multiple frameworks or variants, organize by domain with clear navigation:
In SKILL.md, provide clear pointers:
This pattern ensures Claude loads only the relevant documentation for each use case.

File Naming Conventions

Must be exactly SKILL.md (all caps). This is the entry point that skill loaders expect.
Python scripts (.py), shell scripts (.sh), or other executables. Use descriptive names like aggregate_benchmark.py or package_skill.py.
Markdown files (.md) with descriptive names. For large files (>300 lines), include a table of contents.
Any file type: templates (.html, .docx), images (.png, .svg), fonts (.ttf), etc.

Skill Size Guidelines

These are guidelines, not hard limits. The skill-creator SKILL.md is 480 lines and works well. If your instructions are genuinely complex, it’s fine to exceed 500 lines.

Next Steps

Frontmatter

Learn about YAML frontmatter fields and their purposes

Bundled Resources

Deep dive into scripts, references, and assets