Creating Your Own Skills
The 6-Step Framework
Building a good Skill is like writing a good recipe: You need the right ingredients, clear instructions, and a few test runs. Here's a proven framework in six steps.
Step 1: Identify the Problem
Ask yourself: What do I keep repeating? The best Skills emerge from real frustration:
- "I type the same setup steps for new components every time"
- "I always forget a step during deployment"
- "My code reviews don't follow a consistent structure"
*Rule of Three
If you perform a task manually for the third time, it's time for a Skill. Note recurring patterns in your daily work -- those are your Skill candidates.
Step 2: Context Design
Before writing the SKILL.md, clarify three questions:
- Inputs -- What does Claude need to complete the task? File names, parameters, configuration?
- Constraints -- What rules must be followed? Naming conventions, security policies, style?
- Output format -- What should the end result be? Code, report, file, terminal output?
Step 3: Trigger Design
Decide how the Skill should be triggered:
- Via
/command-- You invoke the Skill explicitly - Automatically -- Claude recognizes from the
descriptionthat the Skill matches - Claude-internal only -- As a helper Skill for other Skills (
user-invocable: false)
!Avoiding False Positives
A too-general description causes the Skill to be triggered for inappropriate tasks. "Helps with code" is too vague. "Generate React components following our design system with Storybook stories" is precise enough.
Step 4: Write the SKILL.md
Now comes the actual file. Structure:
---
name: my-skill
description: Precise description of when the Skill should apply
argument-hint: [parameter]
model: sonnet
---
# Skill Name
## Context
What Claude needs to know about the task.
## Steps
1. First step
2. Second step
3. Third step
## Rules
- Rule 1
- Rule 2
## Output
Description of the expected result.
Best practices for instructions:
- Write clearly and directly -- no filler phrases
- Number your steps -- Claude follows numbered lists more reliably
- Define negative examples -- "Do NOT do X" is often clearer than "Do Y"
- Keep instructions under 500 lines -- shorter Skills are more precise
Step 5: Test
A Skill is only good once it works in practice. Test with at least 5 real prompts:
- Happy path -- The standard case the Skill was built for
- Edge case -- Unusual inputs or boundary conditions
- Wrong context -- Is the Skill falsely triggered?
- Missing inputs -- What happens without arguments?
- Complex case -- A realistic, demanding task
> /my-skill standard-component
> /my-skill edge-case-with-generics
> A completely different task (should NOT trigger the Skill)
Step 6: Iterate
After testing, you'll almost always need adjustments:
- Trigger too broad? -- Narrow the description or add
paths - Trigger too narrow? -- Expand the description or add keywords
- Inconsistent results? -- Make instructions more precise, add examples
- Too slow? -- Switch to
model: sonnetormodel: haiku
The Skill Creator
You don't have to build Skills entirely by hand. Claude Code has a built-in Skill Creator:
> /skill-creator
This interactive assistant guides you through the creation process:
- Asks about the goal of your Skill
- Suggests a suitable Skill type
- Generates the SKILL.md with frontmatter
- Helps with testing and refining
*Skill Creator as a Starting Point
Even if you prefer writing Skills manually -- the Skill Creator is a good starting point. You get a solid foundation that you can then customize.
Evals and Trigger Tuning
For important Skills, systematic quality tracking is worthwhile:
- Run evals -- Define test cases with expected results and check regularly
- Track false positives -- When is the Skill falsely triggered?
- Track false negatives -- When is it not triggered even though it should be?
- Iterate on the description -- This is the most important lever for auto-discovery
Decision Matrix: Skill vs. Plugin vs. Python
Not every automation needs a Skill. Here's the distinction:
| Criterion | Skill | Python/Bash | Plugin |
|---|---|---|---|
| Claude reasoning needed? | Yes | No | Yes |
| Automatic triggering? | Yes | No | Yes |
| Shareable via Git? | Yes | Yes | Yes |
| 100% deterministic? | No | Yes | No |
| Large files (>1MB)? | Difficult | Yes | Possible |
| External APIs? | Via tools | Directly | Via MCP |
| Bundle multiple Skills? | No | No | Yes |
| Integrate MCP servers? | No | No | Yes |
Rule of thumb:
- Skill -- When Claude needs to think and make decisions
- Python/Bash -- When the result must be 100% predictable
- Plugin -- When you want to bundle multiple Skills, agents, and MCP servers
iPlugins in Detail
Plugins are the topic of a dedicated module. There you'll learn how to package Skills, MCP servers, and agent configurations into a shareable bundle.
You build a Skill that is falsely triggered on almost every prompt. What is the most likely cause?