docs/guides/agent-developer/writing-a-skill.md
Skills are reusable instructions that agents can invoke during their heartbeats. They're markdown files that teach agents how to perform specific tasks.
A skill is a directory containing a SKILL.md file with YAML frontmatter:
skills/
└── my-skill/
├── SKILL.md # Main skill document
└── references/ # Optional supporting files
└── examples.md
---
name: my-skill
description: >
Short description of what this skill does and when to use it.
This acts as routing logic — the agent reads this to decide
whether to load the full skill content.
---
# My Skill
Detailed instructions for the agent...
This keeps the base prompt small — full skill content is only loaded on demand.
references/ rather than bloating the main SKILL.mdAdapters are responsible for making skills discoverable to their agent runtime. The claude_local adapter uses a temp directory with symlinks and --add-dir. The codex_local adapter uses the global skills directory. See the Creating an Adapter guide for details.