Overview
Skills provide Claude with domain-specific knowledge and workflows. This guide covers everything you need to know to create high-quality skills.Frontmatter Requirements
EverySKILL.md file must start with YAML frontmatter:
Name Requirements
- Format: kebab-case only
- Length: Maximum 64 characters
- Preferred form: Gerund (verb + -ing)
- Good:
analyzing-contracts,processing-pdfs - Avoid:
contract-analyzer,pdf-processor
- Good:
- Avoid vague names:
helper,utils,tools,misc - Avoid reserved words:
anthropic,claude
Description Requirements
Your description must trigger correctly since skills compete with 100+ others: Best practices:- Third-person voice: “Analyzes X” not “I help with X”
- Include triggers: “Use when auditing Solidity” not just “Smart contract tool”
- Be specific: “Detects reentrancy vulnerabilities” not “Helps with security”
Allowed Tools (Optional)
Restrict the skill to only the tools it needs:Read, Write, Edit, Bash, Grep, Glob, Task, and others.
Required Sections
EverySKILL.md must include these sections:
When to Use
Specify concrete scenarios where the skill applies:Make triggers concrete and specific. Think about what keywords or patterns should activate your skill.
When NOT to Use
Specify scenarios where another approach is better:Security Skills: Rationalizations to Reject
For audit/security skills, also include:Content Organization
Keep SKILL.md under 500 lines
If your skill grows beyond 500 lines, split it into supporting files:
references/- Detailed documentationworkflows/- Step-by-step guidesscripts/- Utility scripts
Keep references one level deep
SKILL.md can link to files, but those files shouldn’t chain to more files:
- ✅ Good:
SKILL.md → file1.md(one level) - ❌ Bad:
SKILL.md → file1.md → file2.md(chained references)
Directory depth is fine (
references/guides/topic.md). The restriction is on reference chains, not nested folders.Path Handling
Good:- Use
{baseDir}for paths relative to the skill directory - Use forward slashes (
/) even on Windows - Claude will automatically replace
{baseDir}with the actual path at runtime
Python Scripts
When skills include Python scripts with dependencies:Use uv run for execution
This enables automatic dependency resolution:No need for separate
pip install or virtual environment setup!Writing Effective Workflows
Workflows should provide step-by-step guidance for complex tasks:Scope Boundaries
Match prescriptiveness to task risk:- Strict for fragile tasks: Security audits, crypto implementations, compliance checks need rigid step-by-step enforcement
- Flexible for variable tasks: Code exploration, documentation, refactoring can offer options and judgment calls
Workflow Format
Value-Add: Behavioral Guidance Over Reference Dumps
Skills should provide guidance Claude doesn’t already have: Behavioral guidance over reference dumps:- Don’t paste entire specs; teach when and how to look things up
- Explain WHY, not just WHAT
- Include trade-offs, decision criteria, judgment calls
- Document anti-patterns WITH explanations
- How to use
dwarfdump,readelf, andpyelftoolsto look up what it needs - Judgment about when each tool is appropriate
- What patterns indicate problems vs normal behavior
Examples and Concreteness
Make examples concrete with actual input → output:Decision Criteria and Trade-offs
Help Claude make judgment calls:Testing Your Skill
Before submitting:- Test triggering: Does the description cause the skill to load at the right times?
- Test workflows: Do the step-by-step instructions work as expected?
- Test scripts: Do all scripts run successfully with
uv run? - Test references: Do all referenced files exist and load correctly?
- Test paths: Does
{baseDir}resolve correctly across different systems?
Next Steps
Best Practices
Learn Trail of Bits quality standards
Plugin Structure
Understand required directory layout
Examples
See real-world skill examples
Getting Started
Start creating your first skill