How to Create Custom Claude Skills: Complete Tutorial (2026)
Step-by-step guide to building Claude Skills from scratch. Covers SKILL.md structure, three progressive tutorials (brand voice to research agent), and best practices.
How to Create Custom Claude Skills: Complete Tutorial (2026)
You've probably noticed it by now: every time you ask Claude to do something specific—format a document a certain way, follow your company's brand guidelines, or structure code reviews according to your team's standards—you have to explain the whole thing again. And again. And again.
It's the AI equivalent of training a brilliant intern who has perfect amnesia every Monday morning.
Claude Skills fix this. They're reusable instruction packages that teach Claude how to handle specific tasks or workflows without you having to re-explain everything in every conversation. Think of them as expertise you package once and Claude applies automatically whenever it's relevant.
This tutorial walks you through creating three progressively complex skills—from a simple brand voice guide to an advanced research agent with subagent execution. By the end, you'll understand the SKILL.md file structure, know how to test and debug your skills, and have templates you can copy-paste to build your own.
Let's start with what you actually need.
Prerequisites: What You Need to Get Started
The good news: if you can write documentation, you can create a Claude skill. No coding required for basic skills, though more advanced ones can include executable scripts if you want.
What you'll need:
- A Claude account with skills enabled (available on Free, Pro, Max, Team, and Enterprise plans)
- A text editor (VS Code, Cursor, or even Notepad works)
- Basic Markdown knowledge (headings, lists, bold text—nothing fancy)
- Optional: Python or JavaScript if you want to add executable scripts to advanced skills
Where skills live:
Skills are just folders with a SKILL.md file inside. Depending on where you save them, they'll be available in different contexts:
- Personal skills:
~/.claude/skills/<skill-name>/— available across all your projects - Project skills:
.claude/skills/<skill-name>/— only for this specific project - Enterprise skills: Managed centrally for your organization
For this tutorial, we'll create personal skills so you can use them everywhere.
Understanding the SKILL.md File Structure
Every skill is built around a SKILL.md file. This is your instruction manual for Claude—it tells Claude what the skill does, when to use it, and exactly how to execute it.
The file has two parts:
1. YAML Frontmatter (The Metadata)
This sits at the top of your file between --- markers. It's how Claude decides whether to load your skill.
---
name: brand-voice
description: Apply Acme Corp's brand voice to all written content. Use when writing blog posts, marketing copy, social media, or any external-facing content.
---
Required fields:
name: Your skill's identifier (becomes the/slash-command)description: What the skill does AND when to use it (this is critical—Claude uses this to auto-trigger)
Optional fields:
disable-model-invocation: true— prevents Claude from auto-triggering (use for workflows you want to invoke manually)user-invocable: false— hides from the/menu (for background knowledge skills)allowed-tools— tools Claude can use without asking permissioncontext: fork— runs the skill in a separate subagent contextdependencies— software packages required (e.g.,python>=3.8)
2. Markdown Body (The Instructions)
Everything below the frontmatter is your actual instructions. This is where you teach Claude how to perform the skill.
Best practices:
- Keep it under 500 lines (if longer, split into supporting files)
- Use clear section headings
- Include examples showing input → output
- Define when to apply the skill
- Be specific about output formats
File Organization Best Practices
For simple skills, everything goes in SKILL.md. But for complex skills, you can add supporting files:
my-skill/
├── SKILL.md # Main instructions (required)
├── templates/
│ └── report-template.md
├── examples/
│ └── sample-output.md
└── scripts/
└── validate.py
Reference these files in your SKILL.md so Claude knows when to load them.
Tutorial 1: Creating a Simple Skill (Beginner)
Let's create a "Brand Voice" skill that ensures all your writing matches your personal or company style.
Step 1: Create the Skill Directory
mkdir -p ~/.claude/skills/brand-voice
cd ~/.claude/skills/brand-voice
Step 2: Write the SKILL.md File
Create SKILL.md with this content:
---
name: brand-voice
description: Apply consistent brand voice to all written content. Use when writing blog posts, emails, social media, marketing copy, or any external-facing communication.
---
# Brand Voice Guidelines
When writing any content, apply these voice principles:
## Tone Characteristics
- **Conversational but professional**: Write like you're explaining to a smart colleague
- **Clear over clever**: Avoid jargon unless necessary; explain complex ideas simply
- **Confident but humble**: Share expertise without being condescending
- **Energetic but not hype-driven**: Show enthusiasm through insight, not exclamation points
## Writing Rules
1. **Use active voice** whenever possible
- Good: "We built this feature"
- Bad: "This feature was built by us"
2. **Keep paragraphs short** (2-4 sentences max)
- Break up walls of text
- Use bullet points for scannable lists
3. **Avoid AI slop phrases**:
- Don't use: "delve into," "it's worth noting," "importantly," "overall"
- Don't use: "Not only X, but also Y" constructions
- Don't overuse em dashes or semicolons
4. **Lead with value**
- Start with what the reader gains
- Front-load the most important information
## Examples
**Before:**
"It is important to note that our platform facilitates the optimization of workflows, thereby enabling users to achieve greater efficiency in their daily tasks."
**After:**
"Our platform helps you work faster. It automates repetitive tasks so you can focus on what matters."
## When to Apply
Apply this voice to:
- Blog posts and articles
- Marketing emails
- Product descriptions
- Social media posts
- External presentations
- Customer-facing documentation
Do NOT apply to:
- Technical documentation (stay precise)
- Legal or compliance content (stay formal)
- Code comments (stay concise)
Step 3: Test the Skill
Enable the skill:
- Open Claude
- Go to Settings > Capabilities > Skills
- Enable "brand-voice"
Test it automatically:
Just start writing and ask Claude to help:
Can you help me write a blog post about our new feature launch?
Claude should automatically apply your brand voice guidelines.
Test it manually:
You can also invoke it directly:
/brand-voice
Rewrite this paragraph: "Our solution leverages cutting-edge technology to facilitate enhanced productivity outcomes."
Validation
Check Claude's thinking panel to confirm it loaded the skill. You should see references to your brand voice guidelines in how it structures the response.
Tutorial 2: Creating an Intermediate Skill
Now let's build a "Code Review" skill that includes supporting files and more sophisticated invocation control.
Step 1: Set Up the Structure
mkdir -p ~/.claude/skills/code-review/{templates,examples}
cd ~/.claude/skills/code-review
Step 2: Create the Main SKILL.md
---
name: code-review
description: Perform thorough code reviews following engineering best practices. Use when reviewing pull requests, code changes, or when asked to analyze code quality.
allowed-tools: Read, Grep
---
# Code Review Skill
Perform comprehensive code reviews focusing on quality, security, and maintainability.
## Review Process
When reviewing code, analyze in this order:
1. **Correctness**: Does the code do what it's supposed to do?
2. **Security**: Are there any vulnerabilities or unsafe patterns?
3. **Performance**: Are there obvious inefficiencies?
4. **Maintainability**: Is the code readable and well-structured?
5. **Testing**: Are there adequate tests?
## Review Template
Use the template in `templates/review-template.md` to structure your feedback.
## Common Issues to Flag
### Security Issues
- Hardcoded credentials or API keys
- SQL injection vulnerabilities
- Unvalidated user input
- Missing authentication/authorization checks
### Code Quality Issues
- Functions longer than 50 lines
- Deeply nested conditionals (>3 levels)
- Duplicate code
- Magic numbers without constants
- Missing error handling
### Performance Issues
- N+1 query problems
- Unnecessary loops or iterations
- Missing database indexes
- Inefficient algorithms
## Output Format
Always structure reviews as:
1. **Summary**: One-sentence verdict (Approve / Request Changes / Comment)
2. **Critical Issues**: Must-fix problems
3. **Suggestions**: Nice-to-have improvements
4. **Positive Feedback**: What was done well
See `examples/sample-review.md` for a complete example.
## When to Use This Skill
- Reviewing pull requests
- Analyzing code quality
- Security audits
- Refactoring suggestions
- Teaching code best practices
Step 3: Add the Review Template
Create templates/review-template.md:
# Code Review: [Title]
**Reviewer**: Claude
**Date**: [Current Date]
**Files Reviewed**: [List of files]
## Summary
[One-sentence verdict: Approve / Request Changes / Comment]
## Critical Issues
[Must-fix problems that block merging]
1. **[Issue Title]**
- **Location**: `file.js:42`
- **Problem**: [What's wrong]
- **Fix**: [How to fix it]
## Suggestions
[Nice-to-have improvements]
1. **[Suggestion Title]**
- **Location**: `file.js:100`
- **Current**: [Current approach]
- **Suggested**: [Better approach]
- **Why**: [Reasoning]
## Positive Feedback
[What was done well]
- [Specific good practice]
- [Well-structured code]
- [Good test coverage]
## Overall Assessment
[Detailed summary of review]
Step 4: Add an Example Review
Create examples/sample-review.md:
# Code Review: Add User Authentication
**Reviewer**: Claude
**Date**: March 2, 2026
**Files Reviewed**: `auth.js`, `middleware.js`, `user.model.js`
## Summary
Request Changes - Security issues must be addressed before merging.
## Critical Issues
1. **Hardcoded Secret Key**
- **Location**: `auth.js:15`
- **Problem**: JWT secret is hardcoded as "mysecret123"
- **Fix**: Move to environment variable: `process.env.JWT_SECRET`
2. **Missing Input Validation**
- **Location**: `auth.js:42`
- **Problem**: Email and password not validated before database query
- **Fix**: Add validation using a library like Joi or express-validator
## Suggestions
1. **Add Rate Limiting**
- **Location**: `auth.js:30`
- **Current**: No rate limiting on login endpoint
- **Suggested**: Add express-rate-limit middleware
- **Why**: Prevents brute force attacks
## Positive Feedback
- Excellent test coverage (95%)
- Clear error messages for users
- Well-structured middleware pattern
## Overall Assessment
Strong implementation with good test coverage. The authentication flow is well-designed, but critical security issues must be fixed before this can be merged safely.
Step 5: Test the Skill
Invoke it on actual code:
/code-review
Please review this file: src/auth/login.js
Claude should follow your template and flag issues according to your guidelines.
Invocation Control
Notice we set allowed-tools: Read, Grep in the frontmatter. This means Claude can read files and search code without asking permission every time—making reviews faster and more autonomous.
Tutorial 3: Creating an Advanced Skill
Let's build a "Research Agent" skill that uses subagent execution and dynamic context injection. This is where skills get powerful.
Step 1: Create the Skill Structure
mkdir -p ~/.claude/skills/research-agent/{scripts,references}
cd ~/.claude/skills/research-agent
Step 2: Write the Advanced SKILL.md
---
name: research-agent
description: Conduct comprehensive research on any topic using web search, document analysis, and synthesis. Use when asked to research, investigate, analyze trends, or gather information on a topic.
context: fork
allowed-tools: WebSearch, Read, Scrape
---
# Research Agent
Conduct thorough, well-sourced research on any topic and synthesize findings into actionable insights.
## Research Process
1. **Understand the Question**
- Clarify the research objective
- Identify key areas to investigate
- Determine success criteria
2. **Information Gathering** (Parallel Execution)
- Search for recent sources (last 12 months preferred)
- Identify authoritative sources
- Collect diverse perspectives
- Scrape relevant content from key URLs
3. **Analysis**
- Synthesize findings across sources
- Identify patterns and trends
- Note contradictions or debates
- Assess source credibility
4. **Synthesis**
- Structure findings logically
- Highlight key insights
- Provide actionable recommendations
- Cite all sources
## Output Format
Structure research reports as:
### Executive Summary
[2-3 sentence overview of findings]
### Key Findings
1. **[Finding Title]**
- Evidence: [Supporting data]
- Source: [Citation]
- Implication: [What this means]
### Detailed Analysis
[Comprehensive breakdown by theme/category]
### Contradictions & Debates
[Areas where sources disagree]
### Recommendations
[Actionable next steps based on research]
### Sources
[Full list of citations with URLs and dates]
## Dynamic Context Injection
When researching, automatically inject:
- Current date context: ${CLAUDE_SESSION_ID}
- Search time range: Last 12 months from today
- Source diversity requirements: Minimum 5 distinct sources
## Subagent Execution
This skill runs in a forked context (`context: fork`) which means:
- Isolated from main conversation
- Can spawn parallel research tasks
- Aggregates findings before returning
- Doesn't pollute main context with intermediate steps
## Quality Standards
**Source Requirements:**
- Prefer primary sources over secondary
- Prioritize recent publications (2025-2026)
- Include academic sources when available
- Verify claims across multiple sources
**Analysis Depth:**
- Go 3 layers deep on key topics
- Explore counterarguments
- Quantify findings when possible
- Note confidence levels
## Example Usage
**Input:**
"Research the current state of AI agent frameworks and which ones are gaining traction"
**Output:**
[Comprehensive report following the structure above, with 8-10 sources, trend analysis, and recommendations]
Step 3: Test the Advanced Skill
/research-agent
Research the adoption trends of Claude Skills vs ChatGPT Custom GPTs in enterprise settings. Focus on 2025-2026 data.
Because this skill has context: fork, Claude will:
- Spawn a separate research subagent
- Execute the research in parallel
- Synthesize findings
- Return a complete report to your main conversation
Dynamic Context Injection
Notice the ${CLAUDE_SESSION_ID} variable in the skill. This gets automatically replaced with the current session ID, useful for:
- Logging research sessions
- Creating session-specific output files
- Tracking which research came from which conversation
Tool Access Restrictions
The allowed-tools: WebSearch, Read, Scrape setting means this skill can:
- Search the web autonomously
- Read files without asking
- Scrape content from URLs
But it CANNOT:
- Write files (not in allowed-tools)
- Execute arbitrary code
- Access restricted APIs
This creates a safe, autonomous research agent.
Skill Frontmatter Reference Guide
Here's every field you can use in your SKILL.md frontmatter, when to use each, and common patterns.
Core Fields
| Field | Type | Required | Purpose |
|---|---|---|---|
name | string | Yes | Skill identifier (becomes /command-name) |
description | string | Yes | What the skill does + when to trigger it |
Invocation Control
| Field | Type | Default | Use When |
|---|---|---|---|
disable-model-invocation | boolean | false | You want manual-only triggering (deployments, sensitive operations) |
user-invocable | boolean | true | Set to false for background knowledge skills users shouldn't invoke directly |
argument-hint | string | none | Add hints for autocomplete: [issue-number] or [filename] [format] |
Execution Context
| Field | Type | Default | Use When |
|---|---|---|---|
context | string | inline | Set to fork for isolated subagent execution |
agent | string | default | Specify which subagent type (explore, code, etc.) |
allowed-tools | array | none | List tools Claude can use without permission |
model | string | default | Override model choice for this skill |
Dependencies
| Field | Type | Use When |
|---|---|---|
dependencies | array | Skill requires specific packages: python>=3.8, pandas>=1.5.0 |
Common Patterns
Pattern 1: Manual-Only Deployment Skill
---
name: deploy-production
description: Deploy application to production environment
disable-model-invocation: true
context: fork
allowed-tools: Shell, Write
---
Pattern 2: Auto-Triggered Writing Skill
---
name: brand-voice
description: Apply brand guidelines to all blog posts, marketing copy, and external content. Trigger whenever writing for external audiences.
user-invocable: true
---
Pattern 3: Background Knowledge Skill
---
name: api-conventions
description: Internal API design patterns and conventions for this codebase
user-invocable: false
---
Pattern 4: Research Skill with Subagent
---
name: deep-research
description: Comprehensive research with web search and synthesis
context: fork
agent: explore
allowed-tools: WebSearch, Read, Scrape
---
Adding Supporting Files to Skills
When your skill needs more than just instructions, add supporting files to keep SKILL.md focused and scannable.
File Organization Strategies
advanced-skill/
├── SKILL.md # Core instructions (300-500 lines)
├── templates/
│ ├── report-template.md # Output format templates
│ └── email-template.md
├── examples/
│ ├── good-example.md # Success examples
│ └── bad-example.md # Anti-patterns
├── references/
│ ├── api-spec.md # Detailed reference docs
│ └── style-guide.md # Extended guidelines
└── scripts/
├── validate.py # Executable validation
└── transform.js # Data transformation
When to Use Supporting Files vs. Inline Content
Use inline content (in SKILL.md) for:
- Core workflow steps (always needed)
- Critical decision logic
- Common examples (2-3 examples)
- Brief reference tables
Use supporting files for:
- Detailed API specifications (>300 lines)
- Large collections of examples (>5 examples)
- Alternative workflows for different scenarios
- Executable scripts
- Templates Claude fills in
Referencing Supporting Files
Always tell Claude what's in supporting files and when to load them:
## API Reference
For detailed endpoint specifications, see `references/api-spec.md`.
Load this file when:
- Implementing API calls
- Debugging API errors
- Designing new endpoints
- Validating request/response formats
Progressive Disclosure Pattern
Structure skills so Claude loads only what it needs:
Level 1: Metadata (always loaded)
name: multi-framework-deploy
description: Deploy applications across AWS, GCP, or Azure
Level 2: SKILL.md (loaded when triggered)
## Deployment Workflow
1. Detect cloud provider from config
2. Load provider-specific reference
3. Execute deployment steps
4. Validate deployment
## Provider Selection
- AWS: See `references/aws-deploy.md`
- GCP: See `references/gcp-deploy.md`
- Azure: See `references/azure-deploy.md`
Level 3: References (loaded as needed)
- Only the relevant cloud provider file gets loaded
- Keeps context window efficient
Testing and Debugging Your Skills
Common Issues and Solutions
Issue 1: Skill Not Triggering
Symptoms: You ask Claude to do something that should trigger your skill, but it doesn't load.
Solutions:
-
Make the description more specific
yaml# Too vague description: Helps with writing # Better description: Apply brand voice guidelines to blog posts, emails, and marketing copy. Use when writing any external-facing content or when user mentions "brand voice" or "style guide" -
Add explicit trigger phrases
yamldescription: Generate SQL queries from natural language. Trigger when user asks to "write a query", "search the database", or mentions SQL, tables, or database operations. -
Check if skill is enabled: Settings > Capabilities > Skills
Issue 2: Skill Triggers Too Often
Symptoms: Your skill activates when it shouldn't, interfering with normal conversations.
Solutions:
-
Narrow the description
yaml# Too broad description: Helps with code # More specific description: Review pull requests for security vulnerabilities. Only use when explicitly asked to review code or analyze security. -
Use
disable-model-invocation: truefor manual-only skills
Issue 3: Skill Runs But Produces Wrong Output
Symptoms: Skill loads but doesn't follow your instructions correctly.
Solutions:
-
Add more examples showing input → output
-
Use stronger directive language:
markdown# Weak You might want to check for security issues # Strong ALWAYS check for these security issues: 1. SQL injection vulnerabilities 2. XSS attack vectors 3. Authentication bypasses -
Structure with clear headings so Claude can navigate instructions
Performance Optimization
Keep Skills Focused
- One skill = one workflow
- Split large skills into multiple smaller ones
- Use supporting files for optional content
Optimize Context Loading
<!-- Bad: Loads everything always -->
Here are 50 examples of good code reviews...
[10,000 words of examples]
<!-- Good: Load on demand -->
For examples, see `examples/code-reviews.md` (load when user asks for examples or when review is unclear)
Use Subagent Execution for Heavy Tasks
context: fork # Runs in isolated context
This prevents your main conversation from getting cluttered with intermediate steps.
Iteration Strategies
The Test-Driven Approach:
-
Write test cases first
Test 1: Input "review auth.js" → Should flag hardcoded secrets Test 2: Input "review api.ts" → Should check for rate limiting Test 3: Input "review utils.py" → Should verify error handling -
Create minimal skill that handles Test 1
-
Run test, observe failure modes
-
Improve skill to handle edge cases
-
Add Tests 2 and 3, repeat
The Conversation Extraction Method:
- Have a natural conversation with Claude where it successfully completes your task
- Copy the conversation into a new chat
- Ask Claude: "Turn this conversation into a skill"
- Review and refine the generated
SKILL.md - Test with new examples
The Incremental Refinement Method:
- Start with a 10-line skill
- Test on 3 examples
- Note what Claude gets wrong
- Add 5-10 lines addressing those issues
- Repeat until quality is acceptable
Publishing and Sharing Your Skills
GitHub Repository Setup
Standard Skill Repository Structure:
my-claude-skills/
├── README.md
├── skills/
│ ├── brand-voice/
│ │ └── SKILL.md
│ ├── code-review/
│ │ ├── SKILL.md
│ │ ├── templates/
│ │ └── examples/
│ └── research-agent/
│ └── SKILL.md
└── docs/
├── installation.md
└── usage-guide.md
README.md Template:
# My Claude Skills Collection
A collection of Claude skills for [your use case].
## Skills Included
### Brand Voice
Applies consistent brand guidelines to all writing.
- **Use when**: Writing blog posts, marketing copy, emails
- **Installation**: Copy to `~/.claude/skills/brand-voice/`
### Code Review
Performs security-focused code reviews.
- **Use when**: Reviewing pull requests
- **Installation**: Copy to `~/.claude/skills/code-review/`
## Installation
1. Clone this repository
2. Copy desired skills to your Claude skills directory:
```bash
cp -r skills/brand-voice ~/.claude/skills/
- Enable skills in Claude: Settings > Capabilities > Skills
Usage
Each skill can be invoked with /skill-name or will trigger automatically based on context.
License
MIT License - feel free to modify and share
### Documentation Best Practices
**For Each Skill, Document:**
1. **What it does** (one sentence)
2. **When to use it** (specific scenarios)
3. **Example invocations** (show both auto-trigger and manual)
4. **Expected output** (screenshots or examples)
5. **Customization options** (what users might want to change)
**Example Skill Documentation:**
```markdown
## Code Review Skill
**What it does**: Performs comprehensive security-focused code reviews following industry best practices.
**When to use it**:
- Reviewing pull requests before merging
- Security audits of existing code
- Teaching junior developers code quality
**Example invocations**:
Auto-trigger:
"Can you review this PR for security issues?"
Manual:
"/code-review src/auth/login.js"
**Expected output**:
- Summary verdict (Approve/Request Changes)
- Critical security issues with fixes
- Code quality suggestions
- Positive feedback on good practices
**Customization**:
Edit `SKILL.md` to adjust:
- Security rules (lines 25-40)
- Code quality standards (lines 42-58)
- Review template (see templates/review-template.md)
Community Contribution Guidelines
If you're sharing skills publicly:
License Your Skills: Add a LICENSE file (MIT is common for skills)
Follow the Agent Skills Standard: Use the format defined at agentskills.io so your skills work across platforms
Include Tests: Show example inputs and expected outputs
Version Your Skills: Use semantic versioning (v1.0.0, v1.1.0, etc.)
Document Dependencies: List any required tools, packages, or MCP connections
Tag Appropriately: Use clear tags (writing, code, research, security, etc.)
20+ Custom Skill Ideas to Build
Writing & Content
- Blog post optimizer (SEO + readability)
- Email tone adjuster (formal ↔ casual)
- Social media thread creator
- Technical documentation generator
- Meeting notes → action items converter
Development 6. Git commit message formatter 7. API documentation generator 8. Test case writer 9. Refactoring suggester 10. Performance profiler
Research & Analysis 11. Competitive analysis researcher 12. Academic paper summarizer 13. Market trend analyzer 14. Customer feedback synthesizer 15. SWOT analysis generator
Business & Operations 16. Project proposal template 17. OKR goal formatter 18. Stakeholder update writer 19. Risk assessment framework 20. Decision document creator
Personal Productivity 21. Daily standup formatter 22. Learning plan creator 23. Reading notes organizer 24. Personal brand voice guide 25. Calendar event summarizer
Pick one that matches a task you do repeatedly, and you'll immediately feel the productivity boost.
TL;DR:
- Claude Skills are reusable instruction packages that teach Claude how to handle specific tasks without re-explaining every time
- The SKILL.md file has two parts: YAML frontmatter (metadata) and Markdown body (instructions)
- Start simple with a brand voice or formatting skill, then progress to intermediate skills with templates, and finally advanced skills with subagent execution
- Test iteratively: Write 2-3 test cases, run them, observe what breaks, refine the skill, repeat
- Skills can include supporting files: templates, examples, references, and executable scripts for complex workflows
- Debugging is about description clarity: If your skill doesn't trigger, make the description more specific with explicit trigger phrases
- Share via GitHub following the Agent Skills standard at agentskills.io for cross-platform compatibility
Meta Description Suggestion: Learn how to create custom Claude Skills with this step-by-step tutorial. Includes three progressive examples (beginner to advanced), SKILL.md templates, testing strategies, and 20+ skill ideas to build. No coding required for basic skills.