.ai/skills/writing-a-skill/SKILL.md
Gather requirements - ask user about:
Draft the skill - create:
Review with user - present draft and ask:
skill-name/
├── SKILL.md # Main instructions (required)
├── REFERENCE.md # Detailed docs (if needed)
├── EXAMPLES.md # Usage examples (if needed)
└── scripts/ # Utility scripts (if needed)
└── helper.ts
---
name: skill-name
description: Brief description of capability. Use when [specific triggers].
---
# Skill Name
## Quick start
[Minimal working example]
## Workflows
[Step-by-step processes with checklists for complex tasks]
## Advanced features
[Link to separate files: See [REFERENCE.md](REFERENCE.md)]
Once the agent loads SKILL.md, every token in it competes with conversation history and other context. Only include what the agent doesn't already know. For each line, ask: "can I assume the agent knows this?" and "does this paragraph justify its token cost?" Prefer concrete examples over explanations.
The name field is also validated:
anthropic, claude)processing-pdfs, writing-documentation); noun phrases (pdf-processing) are also acceptableThe description is the only thing your agent sees when deciding which skill to load. It's surfaced in the system prompt alongside all other installed skills. Your agent reads these descriptions and picks the relevant skill based on the user's request.
Goal: Give your agent just enough info to know:
Format:
Good example:
Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
Bad example:
Helps with documents.
The bad example gives your agent no way to distinguish this from other document skills.
Add utility scripts when:
Split into separate files when:
Reference file rules:
head -100), so files linked from another reference file can be missed.scripts/helper.py), even when authored on Windows.ServerName:tool_name) to avoid "tool not found" errors when multiple MCP servers are loaded.analyze_form.py to extract fields") or read it ("See analyze_form.py for the extraction algorithm"). Execution is preferred for utilities.After drafting, verify: