Build Skills from Scratch
Go beyond a single SKILL.md. A production-quality skill has a structured folder with supporting agents, reference docs, and executable scripts. This lesson walks through building one — file by file — using a code review skill as the example.
The full skill folder structure
This is the structure Anthropic uses for its own published skills (like skill-creator). Only SKILL.md is required — every other folder is optional and added only as your skill grows.
Mockup based on the real Anthropic skill-creator directory structure.
What each subfolder is for
You don't need all of these for a simple skill. Add them one at a time as you hit a real need — don't pre-create empty folders.
Worked example: code-review-assistant
We'll build this skill folder step by step. Start small — SKILL.md only — then add subfolders when the need arises.
Create the folder and write SKILL.md
The skill is just this one file to begin with. The description field is the most important part — write the exact phrases a user would type when asking for a code review.
Add a references/ file for deep guidance
Move bulky reference material out of SKILL.md and into a separate file. Claude reads it only when SKILL.md says “read references/patterns.md first” — zero context cost otherwise.
Add a scripts/ helper for deterministic checks
Scripts let Claude run reliable, repeatable operations without consuming context for the code itself. Claude executes the script via bash and gets back only the output. Update SKILL.md to tell Claude when to call it.
python scripts/validate_syntax.py <file> and report any syntax errors first.”Final folder layout
After completing the three steps above, the skill folder looks like this. Notice it stays lean — we only added the subfolders we actually needed.
When to add each subfolder
| Subfolder | Add it when… |
|---|---|
| agents/ | Your skill needs to hand off to a specialised sub-agent (e.g. one agent extracts, another formats) |
| assets/ | Your SKILL.md references an image, logo, CSV, or other binary file |
| eval-viewer/ | You want to run automated evals to measure and improve skill quality |
| references/ | Your SKILL.md is getting too long, or it points to deep docs Claude should load on demand |
| scripts/ | You need a deterministic operation (validation, conversion, calculation) that shouldn't consume context |
| LICENSE.txt | You plan to share or open-source the skill |
references/), needing reliable calculations (add scripts/), or orchestrating multiple agents (add agents/). A lean skill is easier to debug and maintain.Three ways to build a skill
You don't have to write every line yourself. Beyond authoring SKILL.md by hand, you can ask Claude in a regular chat to draft it for you, or use the /skill-creator plugin for a full guided workflow — testing and iterating included.
Option 2: ask Claude in chat
Open any Claude chat and ask it to write the SKILL.md content for you. Paste the output into ~/.claude/skills/your-skill/SKILL.md and you're done.
Option 3: use the /skill-creator plugin
The /skill-creator plugin is Anthropic-verified and available in Claude Code. It adds four dedicated modes — Create, Eval, Improve, and Benchmark — so you can write, test, and refine a skill without leaving your terminal.
Mockup of a /skill-creator Create session in Claude Code.
- Full control over every line
- Best for simple, focused skills
- No extra plugin or chat needed
- Easy to version-control and diff
- Claude drafts SKILL.md from your description
- Works in any Claude chat — no plugin required
- Fast for simple skills
- You still paste and save the file manually
- Guided Q&A → generates all skill files
- Built-in Eval, Improve, Benchmark modes
- Creates reference and script files too
- Best for complex, multi-file skills
What's Next
You've built a skill. Now let's make sure you know all the ways to invoke and use it effectively in your workflow.