Purpose
Help developers create and manage Claude Code skills following Anthropic best practices. This skill provides comprehensive guidance for:
- Skill Structure: YAML frontmatter configuration, content organization, and file placement
- Trigger Patterns: Keywords, intent patterns, file paths, and content patterns for automatic activation
- Advanced Features: Context forking, tool restrictions, agent delegation, and session tracking
- Enforcement Levels: Block, suggest, and warn behaviors for different use cases
When to Use
Use this skill when you need to:
- Create a new skill from scratch with proper structure and configuration
- Understand trigger patterns - how skills are automatically activated based on user input
- Configure skill behavior - context fork, allowed-tools, agent specification
- Debug skill activation - troubleshoot why a skill isn't triggering as expected
- Implement guardrails - create blocking skills that prevent common mistakes
- Design domain skills - create advisory skills for specific technical areas
- Follow the 500-line rule - structure large skills with progressive disclosure
Key Information
Skill File Structure
Skills are stored in .claude/skills/{skill-name}/SKILL.md with required YAML frontmatter:
---
name: skill-name # Required: Unique identifier
description: Keywords here # Required: Max 1024 chars, include trigger terms
context: fork # Optional: Run in isolated sub-agent context
agent: specialist-name # Optional: Delegate to specific agent
allowed-tools: # Optional: Restrict available tools
- Read
- Grep
- Glob
user-invocable: true # Optional: Show in slash command menu (default: true)
---
Trigger Pattern Best Practices
The description field is critical for skill activation. Include:
- Primary keywords: Direct terms users might use (e.g., "skill", "create skill")
- Related concepts: Associated topics (e.g., "trigger patterns", "hooks")
- File patterns: Relevant paths (e.g., "SKILL.md", "skill-rules.json")
- Action verbs: What users want to do (e.g., "creating", "debugging", "implementing")
The 500-Line Rule
SKILL.md files should stay under 500 lines. For comprehensive skills:
- Keep core guidance in SKILL.md
- Create reference files for detailed documentation
- Add table of contents to reference files > 100 lines
- Use progressive disclosure - start simple, provide depth when needed
Skill Types
1. Guardrail Skills
Purpose: Enforce critical best practices that prevent errors
Characteristics:
- Type:
"guardrail"
- Enforcement:
"block"
- Priority:
"critical" or "high"
- Block file edits until skill used
- Prevent common mistakes (column names, critical errors)
- Session-aware (don't repeat nag in same session)
Examples:
database-verification - Verify table/column names before Prisma queries
frontend-dev-guidelines - Enforce React/TypeScript patterns
When to Use:
- Mistakes that cause runtime errors
- Data integrity concerns
- Critical compatibility issues
2. Domain Skills
Purpose: Provide comprehensive guidance for specific areas
Characteristics:
- Type:
"domain"
- Enforcement:
"suggest"
- Priority:
"high" or "medium"
- Advisory, not mandatory
- Topic or domain-specific
- Comprehensive documentation
Examples:
backend-dev-guidelines - Node.js/Express/TypeScript patterns
frontend-dev-guidelines - React/TypeScript best practices
error-tracking - Sentry integration guidance
When to Use:
- Complex systems requiring deep knowledge
- Best practices documentation
- Architectural patterns
- How-to guides
Creating a New Skill
Step 1: Create Skill File
Location: .claude/skills/{skill-name}/SKILL.md
Basic Template:
---
name: my-new-skill
description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms.
context: fork # Run in isolated sub-agent context
agent: specialist-name # Specify agent type to execute this skill (optional)
allowed-tools: # Restrict tools available to this skill (optional)
---
# My New Skill
## Purpose
What this skill helps with
## When to Use
Specific scenarios and conditions
## Key Information
The actual guidance, documentation, patterns, examples
| Field |
Type |
Description |
name |
string |
Skill identifier (required) |
description |
string |
Trigger keywords and description (required, max 1024 chars) |
context |
string |
Set to fork to run in isolated sub-agent context |
agent |
string |
Agent type to execute this skill (e.g., react-specialist) |
allowed-tools |
list |
YAML list of permitted tools for this skill |
user-invocable |
boolean |
Whether to show in slash command menu (default: true) |
When to use each field:
context: fork: Use for research/exploration skills that should not affect main conversation state. Great for skills that generate lots of intermediate output or may need to be discarded.
agent: Use when a specific specialist agent should handle this skill. Available agents include:
react-specialist - React/frontend tasks
typescript-specialist - TypeScript tasks
postgres-specialist - Database tasks
go-specialist - Go development
graphql-architect - GraphQL tasks
security-specialist - Security audits
debug-specialist - Debugging tasks
code-reviewer - Code review tasks
- And more in
.claude/agents/
allowed-tools: Use to restrict which tools the skill can access. Useful for:
- Read-only skills that shouldn't modify files
- Research skills that only need search tools
- Security-sensitive skills with limited permissions
Best Practices:
- ✅ Name: Lowercase, hyphens, gerund form (verb + -ing) preferred
- ✅ Description: Include ALL trigger keywords/phrases (max 1024 chars)
- ✅ Content: Under 500 lines - use reference files for details
- ✅ Examples: Real code examples
- ✅ Structure: Clear headings, lists, code blocks
- ✅ Context fork: Use for exploration/research to keep main context clean
- ✅ Agent: Specify when domain expertise is needed
Step 2: Follow Anthropic Best Practices
✅ Keep SKILL.md under 500 lines
✅ Use progressive disclosure with reference files
✅ Add table of contents to reference files > 100 lines
✅ Write detailed description with trigger keywords
✅ Test with 3+ real scenarios before documenting
✅ Iterate based on actual usage
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: create-skill-213description: Create and manage Claude Code skills following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter (including context fork, allowed-tools, agent), trigger types (keywords, intent patterns, file paths, content patterns), enforcement levels (block, suggest, warn), hook mechanisms (UserPromptSubmit, PreToolUse), session tracking, and the 500-line rule. Use when this capability is needed.4---56## Purpose78Help developers create and manage Claude Code skills following Anthropic best practices. This skill provides comprehensive guidance for:910- **Skill Structure**: YAML frontmatter configuration, content organization, and file placement11- **Trigger Patterns**: Keywords, intent patterns, file paths, and content patterns for automatic activation12- **Advanced Features**: Context forking, tool restrictions, agent delegation, and session tracking13- **Enforcement Levels**: Block, suggest, and warn behaviors for different use cases1415## When to Use1617Use this skill when you need to:1819- **Create a new skill** from scratch with proper structure and configuration20- **Understand trigger patterns** - how skills are automatically activated based on user input21- **Configure skill behavior** - context fork, allowed-tools, agent specification22- **Debug skill activation** - troubleshoot why a skill isn't triggering as expected23- **Implement guardrails** - create blocking skills that prevent common mistakes24- **Design domain skills** - create advisory skills for specific technical areas25- **Follow the 500-line rule** - structure large skills with progressive disclosure2627## Key Information2829### Skill File Structure3031Skills are stored in `.claude/skills/{skill-name}/SKILL.md` with required YAML frontmatter:3233```yaml34---35name: skill-name # Required: Unique identifier36description: Keywords here # Required: Max 1024 chars, include trigger terms37context: fork # Optional: Run in isolated sub-agent context38agent: specialist-name # Optional: Delegate to specific agent39allowed-tools: # Optional: Restrict available tools40 - Read41 - Grep42 - Glob43user-invocable: true # Optional: Show in slash command menu (default: true)44---45```4647### Trigger Pattern Best Practices4849The `description` field is critical for skill activation. Include:50511. **Primary keywords**: Direct terms users might use (e.g., "skill", "create skill")522. **Related concepts**: Associated topics (e.g., "trigger patterns", "hooks")533. **File patterns**: Relevant paths (e.g., "SKILL.md", "skill-rules.json")544. **Action verbs**: What users want to do (e.g., "creating", "debugging", "implementing")5556### The 500-Line Rule5758SKILL.md files should stay under 500 lines. For comprehensive skills:59601. Keep core guidance in SKILL.md612. Create reference files for detailed documentation623. Add table of contents to reference files > 100 lines634. Use progressive disclosure - start simple, provide depth when needed6465## Skill Types6667### 1. Guardrail Skills6869**Purpose:** Enforce critical best practices that prevent errors7071**Characteristics:**72- Type: `"guardrail"`73- Enforcement: `"block"`74- Priority: `"critical"` or `"high"`75- Block file edits until skill used76- Prevent common mistakes (column names, critical errors)77- Session-aware (don't repeat nag in same session)7879**Examples:**80- `database-verification` - Verify table/column names before Prisma queries81- `frontend-dev-guidelines` - Enforce React/TypeScript patterns8283**When to Use:**84- Mistakes that cause runtime errors85- Data integrity concerns86- Critical compatibility issues8788### 2. Domain Skills8990**Purpose:** Provide comprehensive guidance for specific areas9192**Characteristics:**93- Type: `"domain"`94- Enforcement: `"suggest"`95- Priority: `"high"` or `"medium"`96- Advisory, not mandatory97- Topic or domain-specific98- Comprehensive documentation99100**Examples:**101- `backend-dev-guidelines` - Node.js/Express/TypeScript patterns102- `frontend-dev-guidelines` - React/TypeScript best practices103- `error-tracking` - Sentry integration guidance104105**When to Use:**106- Complex systems requiring deep knowledge107- Best practices documentation108- Architectural patterns109- How-to guides110111---112113## Creating a New Skill114115### Step 1: Create Skill File116117**Location:** `.claude/skills/{skill-name}/SKILL.md`118119**Basic Template:**120```markdown121---122name: my-new-skill123description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms.124context: fork # Run in isolated sub-agent context125agent: specialist-name # Specify agent type to execute this skill (optional)126allowed-tools: # Restrict tools available to this skill (optional)127---128129# My New Skill130131## Purpose132What this skill helps with133134## When to Use135Specific scenarios and conditions136137## Key Information138The actual guidance, documentation, patterns, examples139```140141| Field | Type | Description |142|-------|------|-------------|143| `name` | string | Skill identifier (required) |144| `description` | string | Trigger keywords and description (required, max 1024 chars) |145| `context` | string | Set to `fork` to run in isolated sub-agent context |146| `agent` | string | Agent type to execute this skill (e.g., `react-specialist`) |147| `allowed-tools` | list | YAML list of permitted tools for this skill |148| `user-invocable` | boolean | Whether to show in slash command menu (default: true) |149150**When to use each field:**151152- **`context: fork`**: Use for research/exploration skills that should not affect main conversation state. Great for skills that generate lots of intermediate output or may need to be discarded.153154- **`agent`**: Use when a specific specialist agent should handle this skill. Available agents include:155 - `react-specialist` - React/frontend tasks156 - `typescript-specialist` - TypeScript tasks157 - `postgres-specialist` - Database tasks158 - `go-specialist` - Go development159 - `graphql-architect` - GraphQL tasks160 - `security-specialist` - Security audits161 - `debug-specialist` - Debugging tasks162 - `code-reviewer` - Code review tasks163 - And more in `.claude/agents/`164165- **`allowed-tools`**: Use to restrict which tools the skill can access. Useful for:166 - Read-only skills that shouldn't modify files167 - Research skills that only need search tools168 - Security-sensitive skills with limited permissions169170**Best Practices:**171- ✅ **Name**: Lowercase, hyphens, gerund form (verb + -ing) preferred172- ✅ **Description**: Include ALL trigger keywords/phrases (max 1024 chars)173- ✅ **Content**: Under 500 lines - use reference files for details174- ✅ **Examples**: Real code examples175- ✅ **Structure**: Clear headings, lists, code blocks176- ✅ **Context fork**: Use for exploration/research to keep main context clean177- ✅ **Agent**: Specify when domain expertise is needed178179### Step 2: Follow Anthropic Best Practices180181✅ Keep SKILL.md under 500 lines182✅ Use progressive disclosure with reference files183✅ Add table of contents to reference files > 100 lines184✅ Write detailed description with trigger keywords185✅ Test with 3+ real scenarios before documenting186✅ Iterate based on actual usage187188---189> Converted and distributed by [TomeVault](https://tomevault.io/claim/runxgalee) — claim your Tome and manage your conversions.190<!-- tomevault:4.0:skill_md:2026-04-14 -->