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:The SKILL.md File
TheSKILL.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:Real-World Example: skill-creator
Here’s how Anthropic’sskill-creator skill is organized:
Real-World Example: mcp-builder
Themcp-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: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.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.
Domain Organization Pattern
When a skill supports multiple frameworks or variants, organize by domain with clear navigation:File Naming Conventions
SKILL.md
SKILL.md
Must be exactly
SKILL.md (all caps). This is the entry point that skill loaders expect.scripts/
scripts/
Python scripts (
.py), shell scripts (.sh), or other executables. Use descriptive names like aggregate_benchmark.py or package_skill.py.references/
references/
Markdown files (
.md) with descriptive names. For large files (>300 lines), include a table of contents.assets/
assets/
Any file type: templates (
.html, .docx), images (.png, .svg), fonts (.ttf), etc.Skill Size Guidelines
| Component | Recommended Size | Rationale |
|---|---|---|
| SKILL.md frontmatter | ~100 words | Always in context, keep concise |
| SKILL.md body | <500 lines | Loaded on trigger, affects performance |
| Reference files | Unlimited | Loaded selectively, can be extensive |
| Scripts | Unlimited | Execute without loading into context |
| Assets | Reasonable | Embedded in outputs, consider file sizes |
Next Steps
Frontmatter
Learn about YAML frontmatter fields and their purposes
Bundled Resources
Deep dive into scripts, references, and assets