skill tool, and the skill’s markdown content is returned as structured output.
Skill File Format
Each skill is a directory containing aSKILL.md file with YAML frontmatter:
SKILL.md
^[a-z0-9]+(-[a-z0-9]+)*$).
Configuration
Point the agent at one or more directories containing skill folders:~/ for the home directory. When multiple paths contain a skill with the same name, later paths take precedence.
How It Works
Whenskills is configured, a skill tool is automatically added to the agent’s toolset (similar to how the task tool is auto-generated for subagents). The tool’s description includes an XML listing of all available skills, so the model knows what it can invoke.
Skills are discovered lazily on the first run() call and cached for the agent’s lifetime.
When the model calls the skill tool:
- The skill’s markdown body is returned as structured XML output
- Auxiliary files in the skill directory (up to 10) are listed so the model can read them with other tools
- The base directory path is included so relative references resolve correctly
tool.start and tool.done events. It also goes through the approve callback if one is configured.