Overview
Every skill is a directory with a requiredSKILL.md file at its root. The file has two parts: YAML frontmatter and a Markdown body. Supporting files live alongside SKILL.md in the same directory.
YAML frontmatter
The frontmatter is the first section ofSKILL.md, delimited by ---. It contains two required fields:
The name field
- Must match the directory name
- Use letters, numbers, and hyphens only — no parentheses, spaces, or special characters
- 64-character maximum
- Use gerund form for processes:
test-driven-development,writing-skills,condition-based-waiting
The description field — the most important part
At startup, the agent loads name and description from every available skill. These two fields are the only information used to decide which skills to activate for a given task.
The description must describe triggering conditions only. Never summarize the skill’s process or workflow — that creates a shortcut the agent will take instead of reading the skill body.
- Start with “Use when…” to focus on triggering conditions
- Write in third person (it’s injected into the system prompt)
- 1024-character maximum
- Include concrete symptoms, error messages, and situations
- Keep technology-agnostic unless the skill is technology-specific
The Markdown body
After the frontmatter, the rest ofSKILL.md is standard Markdown that the agent reads and follows.
A complete skill body follows this structure:
Special XML tags
Skills use a small set of XML tags to communicate critical requirements to the agent.<HARD-GATE>
Blocks the agent from proceeding until an explicit condition is met. Used in the brainstorming skill to prevent implementation before design approval:
<SUBAGENT-STOP>
Tells dispatched subagents to skip the skill. Used in using-superpowers because session-establishment instructions shouldn’t re-run inside subagent contexts:
<EXTREMELY-IMPORTANT>
Highlights requirements so critical they need to stand out from the surrounding text:
These tags are conventions used by the Superpowers skill library. They work because agents trained on human text recognize patterns of emphasis and structural markers. They’re not parsed by any framework.
Flowchart diagrams
Skills can include Graphviz dot diagrams for process flows. Use them only for non-obvious decision points where a visual would prevent the agent from going wrong.- Non-obvious decision points
- Process loops where the agent might stop too early
- “When to use A vs B” decisions
- Reference material (use tables or lists)
- Code examples (use fenced code blocks)
- Linear instructions (use numbered lists)
- Labels without semantic meaning (
step1,helper2)
Reference files
When supporting content is too large to keep inline, put it in a subdirectory and link to it fromSKILL.md.
SKILL.md → advanced.md → details.md. The agent may only partially read nested references.
Name files descriptively. Use names that indicate content: form_validation_rules.md, not doc2.md.
Structure long reference files with a table of contents so the agent can see the full scope even when previewing partial content.
File organization patterns
Self-contained skill
All content fits inSKILL.md. No supporting files needed.
Skill with reusable tool
A supporting file contains working code the agent can adapt or execute.Skill with heavy reference
Reference material too large for inline — API docs, comprehensive syntax guides.Annotated real example: brainstorming skill
Here is the complete frontmatter fromskills/brainstorming/SKILL.md, annotated:
skills/test-driven-development/SKILL.md:
Cross-referencing other skills
When one skill depends on another, reference by name — don’t use@ file links, which force-load the entire file immediately:
Writing Skills
How to write a skill from scratch using TDD principles
Testing Skills
Verify your skill triggers correctly and holds under pressure