Skill Creator
Create, test, and improve .agents/skills/ skills through a structured
draft-test-iterate loop.
Quick start
- Check first — run
skill-finder <capability> to search existing official skills. Only create new if nothing fits.
- Capture intent — what should the skill do and when should it trigger?
- Write SKILL.md — frontmatter + instructions following the spec
- Test — run 2-3 realistic prompts, observe behavior
- Iterate — improve based on results, repeat until satisfied
Workflow
Step 1: Capture intent
Understand what the user wants before writing anything.
- What should this skill enable the agent to do?
- When should it trigger? (user phrases, contexts)
- What's the expected output format?
- Are there edge cases or constraints?
If the current conversation already contains a workflow the user wants to
capture ("turn this into a skill"), extract answers from conversation history:
tools used, sequence of steps, corrections made, input/output formats.
Step 2: Write the SKILL.md
Directory structure
.agents/skills/<skill-name>/
├── SKILL.md # Required: frontmatter + instructions
├── scripts/ # Optional: executable code
└── references/ # Optional: supplementary docs (only when SKILL.md would exceed ~300 lines)
Place in .agents/skills/ for repo-scope or ~/.agents/skills/ for user-scope.
Frontmatter (required fields)
---
name: my-skill
description: >
What this skill does. Use when [specific trigger contexts].
Activates on: "keyword1", "keyword2", even if the user
does not explicitly mention [topic].
---
name rules:
- 1–64 characters, lowercase
a-z, digits 0-9, hyphens - only
- No leading/trailing/consecutive hyphens
- Must match parent directory name exactly
description rules:
- 1–1024 characters
- Third person only: "Processes files" not "I process files"
- Imperative framing: "Use when..." tells the agent when to act
- Be pushy — agents under-trigger by default. Explicitly list contexts,
including non-obvious ones ("even if they don't mention X")
- Focus on user intent, not implementation details
Optional frontmatter fields
argument-hint — shown in skill list (e.g., "[file or directory]")
compatibility — platform/environment requirements (1–500 chars)
allowed-tools — space-separated pre-approved tools (experimental, use sparingly)
license — license name or reference
metadata — string key-value pairs (author, version, etc.)
Body structure
# Skill Name
One-line summary of what this skill does.
## Quick start
1. Most common use case in 3 steps
2. Step two
3. Step three
## Detailed workflow
### Gather
Read relevant files, understand current state.
### Act
Make changes, run scripts, generate output.
### Verify
Check results, validate output, confirm correctness.
## Gotchas
- Non-obvious fact that prevents mistakes
- Environment quirk the agent can't infer from code
Content guidelines
Add only what the agent lacks. For every piece of content, ask:
"Would the agent get this wrong without this?" If not, cut it.
- No explanations of general concepts (what PDFs are, how HTTP works)
- Every token must justify its cost — the context window is shared
- Instructions in imperative form ("Run X", "Check Y")
- Explain the why: "Filter test accounts because production reports
include them otherwise" beats "ALWAYS filter test accounts"
Match specificity to fragility:
- High freedom for flexible tasks (reviews, writing) — general guidelines
- Low freedom for fragile operations (migrations, destructive ops) — exact scripts
Progressive disclosure:
- Core instructions in SKILL.md (under 500 lines)
- Detailed reference in separate files, clearly signposted with "when to read" guidance
- References one level deep from SKILL.md (no A → B → C chains)
- Table of contents in reference files over 100 lines
Step 3: Test with real usage
Create 2-3 realistic test prompts to smoke-test the workflow end-to-end.
(Separate from Step 5's 20 eval queries, which test description triggering.)
Share them with the user for review before running.
Run the skill against each prompt and observe:
- Does the skill trigger when it should?
- Does the agent follow the instructions correctly?
- Is the output what the user expects?
- Does the agent waste time on unproductive steps?
Step 4: Iterate
Based on test results:
- Generalize from feedback — don't overfit to specific test cases.
The skill will be used across many prompts. Fiddly, overfitty changes
for one test case hurt all others.
- Keep it lean — remove instructions that aren't pulling their weight.
Read transcripts, not just outputs. If the agent wastes time on something,
cut the instruction causing it.
- Explain the why — reasoning-based instructions outperform rigid directives.
If you find yourself writing ALWAYS/NEVER in caps, reframe and explain
the reasoning instead.
- Look for repeated work — if the agent independently writes the same
helper script across test runs, bundle it in
scripts/.
Repeat test-iterate until the user is satisfied.
Step 5: Optimize description (if needed)
If the skill doesn't trigger reliably:
- Create 20 eval queries (10 should-trigger, 10 should-not-trigger)
- Should-trigger: vary phrasing, explicitness, detail level
- Should-not-trigger: focus on near-misses (share keywords but need different skill)
- Split 60% train / 40% validation
- Run each query 3 times (model behavior is nondeterministic)
- Iterate: identify failures in train set → revise description → test (up to 5 iterations)
- Select best by validation score to avoid overfitting
Watch for overfitting: train improving but validation dropping, description
growing toward 1024 chars, specific test keywords leaking into description.
Anti-patterns to avoid
| Anti-pattern |
Fix |
| Vague description |
Be specific, include trigger contexts |
| First person ("I can help") |
Third person ("Processes files") |
| Over-explaining basics |
Trust agent's knowledge, add only what it lacks |
| SKILL.md > 500 lines |
Split into references |
| Deeply nested refs (A→B→C) |
One level deep only |
Windows paths (\) |
Always use / |
| Time-sensitive information |
Use "old patterns" section or avoid |
| Too many options without default |
Provide default + escape hatch |
| Magic constants |
Document every value |
| Rigid ALWAYS/NEVER |
Explain the reasoning instead |
Pre-publish checklist
Gotchas
- Description is the routing key — spend more time on it than on the body content
- Agents under-trigger by default; err on the side of pushy descriptions
~/.agents/skills/ is user-scope (global), .agents/skills/ is repo-scope — choose based on whether the skill is project-specific or general
references/ is opt-in — don't create empty placeholder directories
- Keep SKILL.md flat by default: SKILL.md + scripts/ if needed, references/ only when SKILL.md would exceed ~300 lines
- On Windows, use directory junctions (
mklink /J) to sync between ~/.agents/skills/ and platform-specific paths like ~/.claude/skills/
- Ground behavioral claims in sources — if you write "X is experimental" or "Y silently truncates at N chars", link the spec/README or code. Unverified claims rot as ecosystems evolve and mislead future readers
Cross-platform compatibility
When creating skills for multiple platforms:
- Forward slashes in all file paths
- State prerequisites explicitly (don't assume tools are available)
- Use fully qualified MCP tool names (
Server:tool_name)
- Pin dependency versions (
npx eslint@9.0.0, uv run ruff@0.8.0)
- No interactive prompts in scripts — agents use non-interactive shells
- Structured output (JSON/CSV to stdout, diagnostics to stderr)
1---2name: skill-creator-23description: Creates new agent skills and iteratively improves existing ones following the .agents/skills/ specification. Guides through intent capture, SKILL.md writing, testing, and description optimization. Use when creating a skill from scratch, turning a workflow into a reusable skill, improving an existing skill's content or triggering, or when the user says "make this a skill", "create a skill for X", "turn this into a skill", even if they don't explicitly mention "skill" but describe a repeatable workflow they want to automate.4---56# Skill Creator78Create, test, and improve `.agents/skills/` skills through a structured9draft-test-iterate loop.1011## Quick start12130. **Check first** — run `skill-finder <capability>` to search existing official skills. Only create new if nothing fits.141. **Capture intent** — what should the skill do and when should it trigger?152. **Write SKILL.md** — frontmatter + instructions following the spec163. **Test** — run 2-3 realistic prompts, observe behavior174. **Iterate** — improve based on results, repeat until satisfied1819## Workflow2021### Step 1: Capture intent2223Understand what the user wants before writing anything.24251. What should this skill enable the agent to do?262. When should it trigger? (user phrases, contexts)273. What's the expected output format?284. Are there edge cases or constraints?2930If the current conversation already contains a workflow the user wants to31capture ("turn this into a skill"), extract answers from conversation history:32tools used, sequence of steps, corrections made, input/output formats.3334### Step 2: Write the SKILL.md3536#### Directory structure3738```39.agents/skills/<skill-name>/40├── SKILL.md # Required: frontmatter + instructions41├── scripts/ # Optional: executable code42└── references/ # Optional: supplementary docs (only when SKILL.md would exceed ~300 lines)43```4445Place in `.agents/skills/` for repo-scope or `~/.agents/skills/` for user-scope.4647#### Frontmatter (required fields)4849```yaml50---51name: my-skill52description: >53 What this skill does. Use when [specific trigger contexts].54 Activates on: "keyword1", "keyword2", even if the user55 does not explicitly mention [topic].56---57```5859**name rules:**60- 1–64 characters, lowercase `a-z`, digits `0-9`, hyphens `-` only61- No leading/trailing/consecutive hyphens62- Must match parent directory name exactly6364**description rules:**65- 1–1024 characters66- Third person only: "Processes files" not "I process files"67- Imperative framing: "Use when..." tells the agent when to act68- Be **pushy** — agents under-trigger by default. Explicitly list contexts,69 including non-obvious ones ("even if they don't mention X")70- Focus on user intent, not implementation details7172#### Optional frontmatter fields7374- `argument-hint` — shown in skill list (e.g., `"[file or directory]"`)75- `compatibility` — platform/environment requirements (1–500 chars)76- `allowed-tools` — space-separated pre-approved tools (experimental, use sparingly)77- `license` — license name or reference78- `metadata` — string key-value pairs (author, version, etc.)7980#### Body structure8182```markdown83# Skill Name8485One-line summary of what this skill does.8687## Quick start881. Most common use case in 3 steps892. Step two903. Step three9192## Detailed workflow9394### Gather95Read relevant files, understand current state.9697### Act98Make changes, run scripts, generate output.99100### Verify101Check results, validate output, confirm correctness.102103## Gotchas104- Non-obvious fact that prevents mistakes105- Environment quirk the agent can't infer from code106```107108#### Content guidelines109110**Add only what the agent lacks.** For every piece of content, ask:111"Would the agent get this wrong without this?" If not, cut it.112113- No explanations of general concepts (what PDFs are, how HTTP works)114- Every token must justify its cost — the context window is shared115- Instructions in imperative form ("Run X", "Check Y")116- Explain the **why**: "Filter test accounts because production reports117 include them otherwise" beats "ALWAYS filter test accounts"118119**Match specificity to fragility:**120- High freedom for flexible tasks (reviews, writing) — general guidelines121- Low freedom for fragile operations (migrations, destructive ops) — exact scripts122123**Progressive disclosure:**124- Core instructions in SKILL.md (under 500 lines)125- Detailed reference in separate files, clearly signposted with "when to read" guidance126- References one level deep from SKILL.md (no A → B → C chains)127- Table of contents in reference files over 100 lines128129### Step 3: Test with real usage130131Create 2-3 realistic test prompts to smoke-test the workflow end-to-end.132(Separate from Step 5's 20 eval queries, which test description triggering.)133Share them with the user for review before running.134135Run the skill against each prompt and observe:136- Does the skill trigger when it should?137- Does the agent follow the instructions correctly?138- Is the output what the user expects?139- Does the agent waste time on unproductive steps?140141### Step 4: Iterate142143Based on test results:1441451. **Generalize from feedback** — don't overfit to specific test cases.146 The skill will be used across many prompts. Fiddly, overfitty changes147 for one test case hurt all others.1482. **Keep it lean** — remove instructions that aren't pulling their weight.149 Read transcripts, not just outputs. If the agent wastes time on something,150 cut the instruction causing it.1513. **Explain the why** — reasoning-based instructions outperform rigid directives.152 If you find yourself writing ALWAYS/NEVER in caps, reframe and explain153 the reasoning instead.1544. **Look for repeated work** — if the agent independently writes the same155 helper script across test runs, bundle it in `scripts/`.156157Repeat test-iterate until the user is satisfied.158159### Step 5: Optimize description (if needed)160161If the skill doesn't trigger reliably:1621631. Create 20 eval queries (10 should-trigger, 10 should-not-trigger)164 - Should-trigger: vary phrasing, explicitness, detail level165 - Should-not-trigger: focus on **near-misses** (share keywords but need different skill)1662. Split 60% train / 40% validation1673. Run each query 3 times (model behavior is nondeterministic)1684. Iterate: identify failures in train set → revise description → test (up to 5 iterations)1695. Select best by **validation** score to avoid overfitting170171Watch for overfitting: train improving but validation dropping, description172growing toward 1024 chars, specific test keywords leaking into description.173174## Anti-patterns to avoid175176| Anti-pattern | Fix |177|-------------|-----|178| Vague description | Be specific, include trigger contexts |179| First person ("I can help") | Third person ("Processes files") |180| Over-explaining basics | Trust agent's knowledge, add only what it lacks |181| SKILL.md > 500 lines | Split into references |182| Deeply nested refs (A→B→C) | One level deep only |183| Windows paths (`\`) | Always use `/` |184| Time-sensitive information | Use "old patterns" section or avoid |185| Too many options without default | Provide default + escape hatch |186| Magic constants | Document every value |187| Rigid ALWAYS/NEVER | Explain the reasoning instead |188189## Pre-publish checklist190191- [ ] `name` matches directory, lowercase+hyphens, 1–64 chars192- [ ] `description`: specific, third person, includes triggers, < 1024 chars193- [ ] SKILL.md body under 500 lines194- [ ] No time-sensitive information195- [ ] Consistent terminology throughout196- [ ] Forward slashes in all paths197- [ ] All referenced files exist and are reachable from SKILL.md198- [ ] 2-3 test prompts run and results verified199- [ ] Description triggers correctly (not too narrow or too broad)200- [ ] `compatibility` field set if the skill targets multiple platforms201202## Gotchas203204- Description is the routing key — spend more time on it than on the body content205- Agents under-trigger by default; err on the side of pushy descriptions206- `~/.agents/skills/` is user-scope (global), `.agents/skills/` is repo-scope — choose based on whether the skill is project-specific or general207- `references/` is opt-in — don't create empty placeholder directories208- Keep SKILL.md flat by default: SKILL.md + scripts/ if needed, references/ only when SKILL.md would exceed ~300 lines209- On Windows, use directory junctions (`mklink /J`) to sync between `~/.agents/skills/` and platform-specific paths like `~/.claude/skills/`210- Ground behavioral claims in sources — if you write "X is experimental" or "Y silently truncates at N chars", link the spec/README or code. Unverified claims rot as ecosystems evolve and mislead future readers211212## Cross-platform compatibility213214When creating skills for multiple platforms:215- Forward slashes in all file paths216- State prerequisites explicitly (don't assume tools are available)217- Use fully qualified MCP tool names (`Server:tool_name`)218- Pin dependency versions (`npx eslint@9.0.0`, `uv run ruff@0.8.0`)219- No interactive prompts in scripts — agents use non-interactive shells220- Structured output (JSON/CSV to stdout, diagnostics to stderr)