How to Write Good Skill Instructions
The quality of your SKILL.md determines how reliably Claude performs the task. A vague description produces inconsistent results; a precise one produces the same output every time.
Say exactly what the skill does, not just what it is about.
Tell Claude which phrases should activate the skill.
Specify format, length, and structure of the expected response.
One sentence — who Claude is playing while running this skill.
Numbered steps prevent Claude from skipping or reordering tasks.
What Claude must NOT do is often more important than what it should.
Before & after: the same skill, written two ways
The two skills below have the same name and intent — reviewing code. The difference is how precisely the instructions are written.
Anatomy of a well-written SKILL.md
Every section of your skill file has a specific job. Here is what each part controls and the most common mistake for each.
| Section | What it controls | Common mistake |
|---|---|---|
name | The slash command: /name | Spaces or uppercase — use kebab-case only |
description | Auto-detection trigger + context for Claude | One vague line — should be 3–5 lines |
allowed-tools | Which Claude tools the skill can use | Omitting Read when the skill needs file access |
## Role | Claude's persona while running the skill | Skipping it — Claude defaults to generic assistant |
## Steps | The ordered workflow Claude must follow | Prose instead of numbered steps |
## Output format | Shape and length of the final response | Not specifying — output varies every run |
## Constraints | What Claude must NOT do | Skipping it — leads to runaway or unexpected behaviour |
Write a description that does three things
The description field is read by Claude every time it decides whether to auto-activate your skill. It should answer three questions: What does it do? When is it triggered? What does it output?
Always specify an output format
Without an output format section, Claude picks a format on its own — and it changes every run. Specify format, length, and any structural requirements explicitly.
type(scope): description. Optionally follow with a blank line and a one-paragraph body if the change is complex."Use constraints to stop unwanted behaviour
Claude tries to be helpful beyond the task. A ## Constraints section explicitly draws the boundary — what the skill should not do.
Quick checklist before saving a skill
What's Next
Writing good instructions is an art. The next lesson shows you how to test your skills systematically so they work reliably every time.