Expert guidance for creating high-quality Claude Code skills following Anthropic's official best practices. Use when creating, improving, or auditing skill files.
/plugin marketplace add nathanvale/side-quest-marketplace/plugin install melanie@side-quest-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Guide for creating effective, well-structured Claude Code skills that follow Anthropic's official best practices.
Structure skills as a table of contents where Claude loads content on-demand:
Pattern: Keep SKILL.md under 500 lines. Move detailed content to separate reference files.
Example:
## Step 1: Analyze Code
Run the analyzer: `bun run analyzer.ts`
**Output**: See [output-templates.md#analysis](references/output-templates.md#analysis) for format
The most critical fields - Claude uses these to decide when to trigger the skill.
Good description:
description: Books cinema tickets at Classic Cinemas. Use when Nathan asks to book tickets, see movies showing, or get cinema seats.
Bad description:
description: A helpful skill for booking things
Rules:
One-level-deep references from SKILL.md:
skill/
├── SKILL.md # Overview, workflow steps
└── references/
├── templates.md # Output formats
├── commands.md # CLI reference
└── errors.md # Error recovery
Don't do:
skill/
├── SKILL.md
└── references/
├── advanced/
│ └── deep-file.md # Too deep!
---
name: my-skill
description: What it does and when to use it
allowed-tools: Bash, Read, Write
model: claude-sonnet-4-5
---
# Skill Title
Brief introduction explaining purpose.
## Workflow Overview
[Optional: Visual diagram of steps]
## Step 1: First Action
**Action**: What to do
**Command/Tool**: Specific tool or bash command
**Output**: Template reference or inline format
**Wait for**: User response or validation
---
## Step 2: Second Action
[Continue pattern...]
---
## References
- [Templates](references/templates.md) - Exact output formats
- [Commands](references/commands.md) - CLI reference
- [Errors](references/errors.md) - Recovery patterns
CRITICAL: Create a separate references/output-templates.md file with exact copy-paste formats.
# Output Templates
**CRITICAL**: Use these exact templates. Copy the structure precisely.
---
## Template Name
**ALWAYS use this exact format**:
\`\`\`
[Exact format with placeholders]
\`\`\`
**Rules**:
- Specific formatting requirements
- What to show/hide
- How to handle edge cases
**Mapping from data**:
\`\`\`
field_name → [PLACEHOLDER]
nested.field → [OTHER_PLACEHOLDER]
\`\`\`
**Example**:
\`\`\`
[Concrete example with real data]
\`\`\`
## Step 2: Choose Path
**If** creating new content → Go to Step 3
**If** editing existing → Go to Step 5
## Step 4: Validate
Run validator → identify errors → fix → repeat until passing
**See**: [error-handling.md#validation](references/error-handling.md#validation)
## Step 1: Analyze Request
**Use**:
- `kit_grep` for literal text search
- `kit_semantic` for "find where we handle X"
- `kit_symbols` for function definitions
**See**: [tool-selection.md](references/tool-selection.md) for full decision tree
# My Skill
Keep SKILL.md as overview.
**Resources**:
- [Forms](references/forms.md) - Advanced form handling
- [API](references/api.md) - API details
- [Examples](references/examples.md) - Concrete examples
If certain contexts are rarely used together, keep paths separate:
references/
├── create-workflow.md # Only for creating new items
└── edit-workflow.md # Only for editing existing
Scripts don't load into context - only their output does.
Efficient:
bun run extract-fields.ts # Code not in context
Inefficient:
Parse the JSON manually and extract these 20 fields...
[20 lines of parsing instructions]
For files >100 lines:
# Long Reference File
## Contents
- [Section 1](#section-1)
- [Section 2](#section-2)
## Section 1
...
Likely causes:
Fix: Add trigger phrases to description: "Use when users ask about X, need to Y, or mention Z"
Likely causes:
Fix: Narrow description with specific scenarios
Likely causes:
Fix: Move details to reference files, use "See X" pattern
Likely causes:
Fix: Create output-templates.md with exact formats and examples
Before considering a skill complete:
processing-pdfs)See the-cinema-bandit plugin's ticket-booking skill for a production example:
skills/ticket-booking/
├── SKILL.md (127 lines) # Lean workflow
└── references/
├── output-templates.md # Strict formats
├── cli-commands.md # CLI reference
└── error-handling.md # Recovery patterns
Key features:
Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.