Skills
Restrict tool access and bundle domain knowledge into reusable modules.
What are Skills?#
Skills solve three problems:
- Constrain agents — "This agent should only use testing tools, not
web_search" - Bundle knowledge — Package tool-specific instructions with the tools
- Reuse patterns — Create once, use in multiple agents
Each skill lives in a directory with a SKILL.md file.
Skill Structure#
agents/{agent-name}/skills/{skill-name}/
SKILL.md # Skill definition
scripts/ # Optional verification scripts
verify-tools.shSKILL.md is a markdown file with YAML frontmatter:
skills/test-helper/SKILL.md
---
name: test-helper
description: Skill for testing Rush app features
allowed-tools:
- sqlite
- delegate
---
# Test Helper Skill
## Testing Protocol
When testing a tool:
1. Call with minimal valid input
2. Validate response structure
3. Test edge cases
4. Document resultsFrontmatter fields
| Field | Description |
|---|---|
name | Kebab-case identifier for the skill |
description | One-line description of what the skill does |
allowed-tools | List of tools this skill permits |
Using Skills#
Declare skills in agent.yaml:
agent.yaml
tools:
- name: sqlite
- name: delegate
- name: web_search
skills:
- name: test-helper
config: {}What happens:
- Agent declares 3 tools (
sqlite,delegate,web_search) test-helperrestricts to:sqlite+delegateonlyweb_searchbecomes unavailable- Agent gets
read_skilltool for on-demand access to full instructions
Progressive Disclosure#
Skills use progressive disclosure to save context tokens:
- System prompt only shows skill name + description
- Agent calls
read_skill(name: "test-helper")when it needs full instructions - Full
SKILL.mdcontent is returned on demand
This keeps the system prompt small. The agent loads detailed instructions only when it needs them.
Multiple Skills#
When multiple skills are declared, allowed tools are merged (union):
agent.yaml
skills:
- name: test-helper # Allows: sqlite, delegate
- name: web-researcher # Allows: web_search, web_fetch
# Result: agent can use sqlite, delegate, web_search, web_fetchBest Practices#
- Name skills after their purpose:
test-helper,web-researcher, notskill-1 - Keep
SKILL.mdfocused on the specific tools and workflows - Use
allowed-toolsfor enforcement, don't just document restrictions - Include examples showing how to use the tools effectively
If a skill has more than 5 allowed tools, it's probably too broad. Split it into focused skills.
Anti-Patterns#
Wrong: Generic skill with too many tools
This defeats the purpose of constraining tool access:
name: generic-agent
allowed-tools: [sqlite, delegate, web_search, web_fetch, artifacts, tts, audio_mixer]Right: Focused skills
skills/testing/SKILL.md
name: test-helper
allowed-tools: [sqlite, delegate]skills/research/SKILL.md
name: web-researcher
allowed-tools: [web_search, web_fetch]