How to Create a Claude Skill
How to create a Claude skill is less about writing a long prompt and more about packaging one repeatable task so Claude can find it and follow it. The reader who needs this guide already knows what a skill is. The real question is whether the thing they wrote counts as a skill and why Claude does not call it. The answer starts with a minimal file that loads, then adds only what the task needs. The example below is deliberately small; verify one loading path before adding scripts or extra frontmatter.
How to Create a Claude Skill from a Minimal SKILL.md
Start with one folder and one file. The folder name must match the name field, and the file must be called SKILL.md. This example is complete and runnable as written:
---
name: release-notes
description: Draft release notes from merged pull requests. Use when the user asks for release notes, a changelog summary, or a version announcement.
---
Use this skill when the user asks for release notes or a changelog summary.
1. Read the merged pull requests since the last release tag.
2. Group changes into features, fixes and breaking changes.
3. Write one sentence per user-visible change.
4. Keep internal refactors out of the user-facing list.
5. Stop when every merged pull request is represented or explicitly excluded.
Output format:
- One heading per group.
- One bullet per change.
- No version number unless the user provides one.
Place the folder at .claude/skills/release-notes/. The file is the whole skill: no script, no reference folder and no plugin. If Claude can load this and follow it, the structure is valid. Everything else is an optimization.
The body should tell Claude when to use the skill, what steps to follow and when to stop. The description is not repeated here; it is the routing signal. The body is the procedure. That separation is the core of the Claude skill concept, and it is why a short description can be more important than a long instruction file.
Which Frontmatter Fields Are Required
Two fields are required: name and description. Both live in the YAML block between the opening and closing --- markers. Leave either one out and the skill is either invalid or much harder for the client to match.
name must be 1 to 64 characters, use lowercase letters, numbers and hyphens only, avoid leading and trailing hyphens, and avoid consecutive hyphens. It must also match the parent directory. A folder called Release_Notes with name: release-notes fails the naming rule. A folder called release-notes with name: release_notes fails for the underscore.
description must be 1 to 1,024 characters and should say what the skill does and when to use it. A description that only says "helps with releases" gives Claude no object to match. A description that says "Draft release notes from merged pull requests" gives the client a task, an object and a trigger. If the description cannot survive one sentence, the skill is probably covering two tasks.
Optional fields are useful but not required for a first skill. license records the terms, metadata holds labels such as a version, and allowed-tools is an experimental field for pre-approved tools. Claude Code also reads disable-model-invocation, user-invocable and paths; those change when the skill loads, not what it does. Use them after the basic skill works.
Common frontmatter failures are mechanical. An unquoted colon inside the description, a tab used for indentation, a missing closing ---, or a field name such as Name instead of name can make the block invalid. Run skills-ref validate ./release-notes before you debug the model.
Where to Put the Skill Folder
The client scans personal skills in ~/.claude/skills/<skill-name>/SKILL.md and project skills in .claude/skills/<skill-name>/SKILL.md. It also reads nested .claude/skills/ folders under the files you are editing, plus skills that arrive through plugins. The folder must contain SKILL.md; a bare Markdown file is not a skill.
~/.claude/skills/release-notes/SKILL.md
.claude/skills/release-notes/SKILL.md
packages/frontend/.claude/skills/release-notes/SKILL.md
A single-file skill is enough when the procedure fits in SKILL.md. Add scripts/ when a step can be deterministic, references/ when a document is too long to load every time, and assets/ when the output uses a template or static data. The split is about loading cost, not about looking professional. The SKILL.md structure guide covers those decisions in detail. A project skill is easier for teammates to discover because it arrives with the repository, while a personal skill is easier to reuse across repositories.
How to Verify Claude Actually Triggers the Skill
Verification is a sequence, not a feeling. First, confirm the path:
ls -la ~/.claude/skills/release-notes
head -20 ~/.claude/skills/release-notes/SKILL.md
You should see SKILL.md in the listing and a YAML block at the top of the file. If the file starts with plain Markdown, the skill has no frontmatter and will not match reliably.
Second, handle the restart rule. Claude Code watches skills directories that existed when the session started, so adding a skill inside an existing directory usually takes effect in the current session. Creating a new top-level ~/.claude/skills/ or .claude/skills/ directory for the first time requires a restart. Exit the client completely rather than opening another window.
Third, open the slash menu and look for the skill name. A skill that is user-invocable appears there; a skill with user-invocable: false does not, even though Claude can still load it. If the name is missing, the problem is discovery, not the body.
Fourth, run two prompts:
Draft release notes from the merged pull requests since v2.4.
Review this pull request for missing tests.
The first should trigger the skill. The second should not. If both trigger, the description is too broad. If neither triggers, it is too abstract or the skill is disabled for automatic invocation. This is the same positive-and-negative test the install guide recommends after adding a skill. If the skill appears in the menu but never in automatic routing, the description or the invocation flags are the next place to look.
How to Write a Claude Skill: Description Rules
This section uses the "how to write" phrasing because writing the description is the part most people get wrong. Three rules cover most of it.
-
Name the task and the object. "Draft release notes from merged pull requests" is a match. "A powerful workflow for teams" is not. The first sentence should contain the verb and the noun a user would type.
-
Name the trigger situations. Add the phrasing a user is likely to use: "when the user asks for release notes, a changelog summary, or a version announcement." This is not keyword stuffing; it is how the client decides whether the skill applies.
-
State the boundary. Say what the skill does not handle when a neighboring skill could match. "Do not use this for pull request review" prevents the release-notes skill from competing with a review skill. Keep the description shorter than the body; it is a routing label, not a summary of every step.
Three Failures That Keep a Claude Skill from Loading
The first failure is a description that is too vague. It may mention the domain but not the task, so Claude never has a reason to load the skill. Rewrite the first sentence with the object and the action.
The second failure is a name that does not follow the format. Uppercase letters, underscores, consecutive hyphens and a mismatch with the folder name all break validation. Rename the folder or fix the field, then rerun the validator.
The third failure is the wrong file level. ~/.claude/skills/release-notes.md is not a skill, and ~/.claude/skills/release-notes/release-notes/SKILL.md has an extra folder. The client expects a directory containing SKILL.md, nothing more and nothing less.
Fix those three before you rewrite the instructions. A skill with a perfect body and a broken path behaves exactly like a skill that does not exist. Rename or move the folder before you touch the instructions; structural fixes are cheaper and easier to verify. For team rules around descriptions and versions, see Claude skills best practices. For the official examples that show the pattern, browse the Anthropic skills catalog.
FAQ
Create a folder whose name matches the skill name, add SKILL.md with name and description frontmatter, place it in a skills directory Claude Code scans, then test one prompt that should trigger it and one that should not.
The Agent Skills format requires name and description. Claude Code adds optional fields such as disable-model-invocation, user-invocable and paths, but those change invocation behavior rather than defining the skill.
Name the task and the object in the first sentence, add the situations that should trigger the skill, then state the boundary so neighboring work does not match. Put the trigger words before any explanation.
The description is usually too vague, the directory name does not match the name field, or the file is not at the level Claude Code scans. Check those three before rewriting the instructions.
Related Terms
- SKILL.md
- The required entry file of a skill, containing YAML frontmatter plus the Markdown instructions the agent follows.— Agent Skills specification
- Frontmatter
- The YAML block between --- markers at the top of SKILL.md that declares fields such as name and description.— Agent Skills specification
- Progressive disclosure
- A loading model that keeps skill metadata in context first and reads the full instructions only when the skill is selected.— Agent Skills specification
Sources
- Agent Skills specification· Agent Skills
- anthropics/skills README· Anthropic
- Extend Claude with skills· Anthropic
- Agent Skills in Codex· OpenAI