Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
Skill Writer
This Skill helps you create well-structured Agent Skills for Claude Code that follow best practices and validation requirements.
When to use this Skill
Use this Skill when:
Creating a new Agent Skill
Writing or updating SKILL.md files
Designing skill structure and frontmatter
Troubleshooting skill discovery issues
Converting existing prompts or workflows into Skills
Instructions
Step 1: Determine Skill scope
First, understand what the Skill should do:
Ask clarifying questions:
What specific capability should this Skill provide?
Include specific file extensions (.pdf, .xlsx, .json)
Mention common user phrases ("analyze", "extract", "generate")
List concrete operations (not generic verbs)
Add context clues ("Use when...", "For...")
Step 6: Structure the Skill content
Use clear Markdown sections:
# Skill Name
Brief overview of what this Skill does.
## Quick start
Provide a simple example to get started immediately.
## Instructions
Step-by-step guidance for Claude:
1. First step with clear action
2. Second step with expected outcome
3. Handle edge cases
## Examples
Show concrete usage examples with code or commands.
## Best practices- Key conventions to follow
- Common pitfalls to avoid
- When to use vs. not use
## Requirements
List any dependencies or prerequisites:
```bash
pip install package-name
### Step 7: Add supporting files (optional)
Create additional files for progressive disclosure:
**reference.md**: Detailed API docs, advanced options
**examples.md**: Extended examples and use cases
**scripts/**: Helper scripts and utilities
**templates/**: File templates or boilerplate
Reference them from SKILL.md:
```markdown
For advanced usage, see [reference.md](reference.md).
Run the helper script:
\`\`\`bash
python scripts/helper.py input.txt
\`\`\`
Step 8: Validate the Skill
Check these requirements:
✅ File structure:
SKILL.md exists in correct location
Directory name matches frontmatter name
✅ YAML frontmatter:
Opening --- on line 1
Closing --- before content
Valid YAML (no tabs, correct indentation)
name follows naming rules
description is specific and < 1024 chars
✅ Content quality:
Clear instructions for Claude
Concrete examples provided
Edge cases handled
Dependencies listed (if any)
✅ Testing:
Description matches user questions
Skill activates on relevant queries
Instructions are clear and actionable
Step 9: Test the Skill
Restart Claude Code (if running) to load the Skill
Ask relevant questions that match the description:
Can you help me extract text from this PDF?
Verify activation: Claude should use the Skill automatically
Check behavior: Confirm Claude follows the instructions correctly
Step 10: Debug if needed
If Claude doesn't use the Skill:
Make description more specific:
Add trigger words
Include file types
Mention common user phrases
Check file location:
ls ~/.claude/skills/skill-name/SKILL.md
ls .claude/skills/skill-name/SKILL.md
---name:data-processordescription:ProcessCSVandJSONdatafileswithPythonscripts.Usewhenanalyzingdatafilesortransformingdatasets.---
# Data Processor## Instructions1. Use the processing script:\`\`\`bashpythonscripts/process.pyinput.csv--outputresults.json\`\`\`2. Validate output with:\`\`\`bashpythonscripts/validate.pyresults.json\`\`\`
Multi-file Skill with progressive disclosure
---name:api-designerdescription:DesignRESTAPIsfollowingbestpractices.UsewhencreatingAPIendpoints,designingroutes,orplanningAPIarchitecture.---
# API DesignerQuick start:See [examples.md](examples.md)Detailed reference:See [reference.md](reference.md)## Instructions1.Gatherrequirements2.Designendpoints(seeexamples.md)3.DocumentwithOpenAPIspec4.Reviewagainstbestpractices(seereference.md)
Writing Contracts
If your skill participates in the workflow system (feature path, bug path, security path), add a contract: block to frontmatter. The contract is what makes chaining programmatic — the workflow-router reads contracts to build decision trees and a manager agent uses them to auto-chain skills.
Contract fields
contract:tags: [tag1, tag2] # Capability tags. Used for discovery (see Tag Lookup in workflow-router).# Common: intake, tdd, implementation, testing, security, github, closurestate_source:spec# Which artifact holds this skill's state. Values: spec | security_planinputs:params:# Explicit arguments the skill requires-name:spec_pathrequired:truegates:# State conditions that must be true BEFORE this skill runs.-field:"status"# Field path inside the state artifactvalue:"Approved"# Must equal this value. Router checks this before allowing invocation.outputs:mutates:# State fields this skill WRITES. Router uses this to know what gates will be satisfied next.-field:"Test Plan.status"sets_to:"Tests Written"side_effects: [] # Transparency: list non-state side effects (e.g. "Comments GitHub issue")next: [skill-name] # Skills that are valid to run AFTER this one. Router presents these as options.human_gate:false# If true: workflow pauses for human approval AFTER this skill completes.# The skill AFTER the gate is not invoked until the human says go.
When to use shared primitives
Read DESIGN.md first to understand the shared/ vs primitives/ architecture.
If your skill needs general methodology that applies to ANY project, reference existing shared docs or propose creating a new one:
Existing shared docs:
> See shared/github-ops.md for posting comments and updating project status.> See shared/spec-io.md for reading acceptance criteria and updating Test Plan status.> See shared/e2e-patterns.md for E2E testing patterns (Playwright, reconnaissance-then-action).> See shared/test-planning.md for test granularity framework (when to combine vs split tests).
When to create a NEW shared doc:
Pattern applies to ANY project (not project-specific)
See DESIGN.md → "Why Shared vs Primitives" for the decision rule
Keep your step headers (e.g. "Step 7: Update GitHub Issue") so the skill's flow is readable. Replace only the implementation details under those steps with the reference.
Example: a complete workflow skill frontmatter
---name:plan-testsdescription:"Create a test plan for an approved spec..."contract:tags: [tdd, test-planning]
state_source:specinputs:params:-name:spec_pathrequired:truegates:-field:"status"value:"Approved"outputs:mutates:-field:"Test Plan.status"sets_to:"Planned"side_effects: []
next: [write-failing-test]
human_gate:false---
Best practices for Skill authors
One Skill, one purpose: Don't create mega-Skills
Specific descriptions: Include trigger words users will say
Clear instructions: Write for Claude, not humans
Concrete examples: Show real code, not pseudocode
List dependencies: Mention required packages in description
Test with teammates: Verify activation and clarity
Version your Skills: Document changes in content
Use progressive disclosure: Put advanced details in separate files
Add a contract: If your skill is part of the workflow, declare its contract. See Writing Contracts above.
Use shared primitives: Don't re-implement GitHub ops or spec reading. Reference shared/github-ops.md and shared/spec-io.md.
Validation checklist
Before finalizing a Skill, verify:
Name is lowercase, hyphens only, max 64 chars
Description is specific and < 1024 chars
Description includes "what" and "when"
YAML frontmatter is valid
Instructions are step-by-step
Examples are concrete and realistic
Dependencies are documented
File paths use forward slashes
Skill activates on relevant queries
Claude follows instructions correctly
Troubleshooting
Skill doesn't activate:
Make description more specific with trigger words
Include file types and operations in description
Add "Use when..." clause with user phrases
Multiple Skills conflict:
Make descriptions more distinct
Use different trigger words
Narrow the scope of each Skill
Skill has errors:
Check YAML syntax (no tabs, proper indentation)
Verify file paths (use forward slashes)
Ensure scripts have execute permissions
List all dependencies
Examples
See the documentation for complete examples:
Simple single-file Skill (commit-helper)
Skill with tool permissions (code-reviewer)
Multi-file Skill (pdf-processing)
Output format
When creating a Skill, I will:
Ask clarifying questions about scope and requirements
Suggest a Skill name and location
Create the SKILL.md file with proper frontmatter
Include clear instructions and examples
Add supporting files if needed
Provide testing instructions
Validate against all requirements
The result will be a complete, working Skill that follows all best practices and validation rules.