Thirty installed skills cost Claude about 3,000 tokens of context until a request needs one. Loaded in full, the same thirty would cost about 153,000.
Pick a request and watch which parts of which skill enter the context window. Drag the number of installed skills, then switch to Load everything. Then we build a skill, piece by piece: the folder, the three levels, the description that triggers it, and the tests.
You need to have used Claude or another chatbot and to read a folder tree. We build the rest from zero.
Facts from Anthropic's Agent Skills docs, authoring best practices, Claude Code skills docs, the engineering post Equipping agents for the real world with Agent Skills, and the guide The Complete Guide to Building Skills for Claude. Part of the AI Harness Engineering family; start with Harness Engineering.
Sizes from the Agent Skills docs: about 100 tokens of metadata per skill, a body under 5,000 tokens (we use 5,000). The 200,000-token window and the 2,000-token reference file are illustrative.
Chapter 0
Count what it costs to re-explain your workflow in every new chat
You open a new chat with Claude. Before the real work, you paste your team's rules again: the report starts with a one-paragraph summary, tickets need a size estimate, dates use YYYY-MM-DD. Tomorrow you paste them again. Claude does not remember them between chats.
Call that pasted text the briefing: the instructions you repeat at the start of each chat. Call the size of the briefing in tokens B. Call the chats you start each week n, and the number of weeks w.
T equals B times n times w.
Each chat costs one briefing B. Multiply by the n chats a week and the w weeks. That is T.
With made-up numbers: B = 800 tokens, n = 40 chats, w = 4 weeks. T = 800 × 40 × 4 = 128,000 tokens a month, and 160 pastes by hand.
A skill is a folder of instructions that Claude loads by itself when a task needs it. You write the briefing once. In every chat, Claude sees only a short metadata line, the skill's name and description, of about m = 100 tokens. It loads the full briefing only in the share u of chats that need it.
S equals n times w, times the bracket m plus u times B.
Every chat pays the metadata m. Only the share u of chats also pays the body B. Add them up over all n times w chats to get S.
With made-up numbers: u = 0.25. S = 160 × (100 + 0.25 × 800) = 48,000 tokens, against 128,000. With u = 1, S = 144,000: more tokens than pasting, but you pasted nothing.
Yellow is pasting by hand into every chat. Warm and teal are the skill: body when needed, metadata always. Drag the share of chats that need the workflow.
Illustrative numbers over w = 4 weeks. The 100-token metadata size is the docs' figure.
So the token saving depends on u. The sure saving is your work: no pasting, no forgotten rule, and the same steps in every chat.
The failure. Symptom: a rule is in the briefing, but the output breaks it on some days. Measure: count the chats where you forgot to paste, or pasted an old version. Fix: one skill, one current copy, loaded by Claude.
Chapter 1
Open the folder and name what each file is for
A skill involves no training and no server. It is a directory with one required file, SKILL.md. The file starts with YAML frontmatter: key and value lines between two --- lines. Plain Markdown instructions follow.
foldersprint-planner/ ├── SKILL.md # required: frontmatter + instructions ├── scripts/ │ └── estimate.py # run by Claude; only its output enters context ├── references/ │ └── velocity.md # read only when a step needs it └── assets/ └── ticket.md # a template used in the output
The three folders are optional and follow the open Agent Skills specification. The smallest valid skill is one SKILL.md with a name and a description.
Pick a part. The tree lights it, and the card says what it holds, when it loads and how it enters context.
The folder layout follows the Agent Skills specification; the sprint-planner skill is an example from Anthropic's guide.
SKILL.md points at the other files in plain words: "Before you estimate, read references/velocity.md." Claude follows the pointer when it reaches that step. The docs advise one level of links. If a reference file links to a third file, Claude may only preview it.
Two naming rules from Anthropic's guide. The file name is exactly SKILL.md, upper case; skill.md fails. The folder name is lower case with hyphens, and it matches the name field. Do not put a README.md inside the skill folder. A repository that shares the skill keeps its README one level up.
The failure. Symptom: the upload says it cannot find SKILL.md. Measure: list the folder and read the exact file name. Fix: rename it to SKILL.md, with that case.
Chapter 2
Load each part of a skill only when the task needs it
The context window is everything the model can see in one turn. It is a fixed-size desk. Install thirty skills and load each one in full, and most of the desk is gone before you type.
Skills avoid this with progressive disclosure: Claude loads a skill in three levels, each at a later time (Agent Skills docs).
| Level | What | When it loads | Cost |
|---|---|---|---|
| 1 Metadata | name and description | always, at startup, in the system prompt | about 100 tokens per skill |
| 2 Instructions | the SKILL.md body | when the request matches the description | under 5,000 tokens |
| 3 Resources | reference files, assets, scripts | when a step reaches for them | nothing until read; a script adds only its output |
Call the number of installed skills N and the metadata per skill m. The standing cost is what you pay in every chat, before any skill fires.
C-idle equals N times m.
Each installed skill puts its name and description, m tokens, on the desk. Multiply by the N skills.
N = 30 and m = 100: C-idle = 3,000 tokens, 1.5% of a 200,000-token window.
When one skill fires, its body joins the desk. Call the body b and the reference files Claude reads r.
C-active equals N times m, plus b, plus r.
Keep the standing cost N times m. Add the body b of the one skill in use. Add only the files r that the task opened.
N = 30, m = 100, b = 5,000, and a 2,000-token reference file: C-active = 3,000 + 5,000 + 2,000 = 10,000 tokens. Load all thirty in full instead: 30 × 5,100 = 153,000.
Top bar: progressive disclosure. Bottom bar: every skill loaded in full. Drag the installed skills and choose how deep the active skill goes.
m = 100 and b = 5,000 follow the docs' figures; the 200,000-token window and the 2,000-token file are illustrative.
A script is the cheapest Level 3 item. Claude runs it with bash, and only the output, such as "Validation passed", enters context. The code never does. So the docs say bundled files that nobody reads cost nothing.
The failure. Symptom: answers get slower and worse after you add skills. Measure: add up N times m, and the size of each body. Fix: move rare detail from the body to references/. Anthropic's best practices keep the body under 500 lines.
Chapter 3
Write the one field Claude reads when it chooses a skill
You write a perfect body. Users ask for exactly that job. The skill never loads. Why?
At decision time, Claude sees only Level 1: each skill's name and description. The docs say the description is what Claude matches your request against. A body it has not read cannot help it choose. So the description must say two things: what the skill does, and when to use it.
yaml# good: what it does, then when, with the words users type description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction. # bad: no "when", no words a user would type description: Helps with documents
The good example comes from Anthropic's docs. It names the file type and the words a user says. The docs also ask for the third person: "Processes Excel files", not "I can help you". The description goes into the system prompt, and a mixed point of view can hurt discovery.
You have three skills installed. Pick a request. A skill fires when its description shares enough words with the request. Then make the data skill's description vague.
Illustrative: shared words stand in for the model's judgement of relevance. The rule it shows is from the docs: matching happens on the description, not the body.
The format sets hard limits on the frontmatter (Agent Skills docs):
| Field | Rule |
|---|---|
name | at most 64 characters; lower-case letters, digits and hyphens; no XML tags; must not contain "anthropic" or "claude" |
description | not empty; at most 1,024 characters; no XML tags |
Claude Code adds one more limit: it cuts the description at 1,536 characters in its skill list (Claude Code docs). Put the main use case first.
The failure. Symptom: the skill does not load for the request you built it for. Measure: ask Claude "When would you use the sprint-planner skill?" Claude answers from the description it sees. Fix: add the missing words to the description.
Chapter 4
Write two or three concrete jobs before you write one instruction
Anthropic's guide gives one planning rule first: before you write anything, name two or three concrete use cases. A use case is a job specific enough to test. It has a trigger, steps and a result.
use caseUse case: Project sprint planning
Trigger: User says "help me plan this sprint" or "create sprint tasks"
Steps: 1. Fetch project status from Linear (through MCP)
2. Analyze team velocity and capacity
3. Suggest task priorities
4. Create tasks in Linear with labels and estimates
Result: A planned sprint with its tasks created
The card already holds the skill. The trigger line is a first draft of the description's "when". The steps are the spine of the body. Step 2 asks for references/velocity.md, and the estimates in step 4 ask for a script.
The guide sorts skills into three categories. The category tells you which techniques matter.
| Category | Used for | Example from the guide | Key techniques |
|---|---|---|---|
| 1 Document and asset creation | the same high quality output each time | frontend-design; docx, pptx, xlsx | style guides, templates, quality checklists |
| 2 Workflow automation | multi-step work with a fixed method | skill-creator | steps with validation gates, review loops |
| 3 MCP enhancement | guidance on top of an MCP server's tools | Sentry's sentry-code-review | calls in order, domain knowledge, error handling |
A skill appears at the top. Pick its category. A correct answer drops it into the bucket and shows the next skill.
Example skills are ours, except the three from the guide's table.
Category 3 is where skills meet MCP, the Model Context Protocol. The guide's analogy: MCP is the professional kitchen, with the tools and ingredients. A skill is the recipe. A connected server with no skill gives access, but users must still work out the method.
The failure. Symptom: the skill does a little of everything and nothing well. Measure: try to write one test query for it. If you cannot, the job is not defined. Fix: write the use cases, then cut the skill to them.
Chapter 5
Make each step specific, and give the must-pass checks to a script
The skill fired. Its body is now in context. Claude still skips a step on some runs. The cause is usually the writing, not the model.
markdown# vague: what is "validate", and what then? Validate the data before proceeding. # specific: the command, the input, the two common failures Run `python scripts/validate.py --input {filename}` to check the format. If it fails, the usual causes are: - a missing required field (add it to the CSV) - a bad date (use YYYY-MM-DD)
The vague line leaves three questions open. The specific line answers all three. Each open question is a place where two runs can differ.
Each dot is one run of the same task. Move the instruction from vague to a script, and watch the runs agree.
Illustrative toy: each open question gives a run a made-up 20% chance to go its own way. The direction is the docs' advice; the rates are ours.
Anthropic's best practices match the detail to how fragile the step is. They call this the degree of freedom.
| Freedom | Use when | Write |
|---|---|---|
| High | many ways are valid, such as a code review | a short list of goals |
| Medium | a preferred pattern exists | a template or pseudocode with parameters |
| Low | a slip breaks things, such as a database migration | one exact command: "Do not modify the command" |
Three more habits from the guide and the docs:
For a check that no run may skip, ship a script. Code gives the same verdict on every run; a sentence can be read two ways. The docs add that a ready script is more reliable than code Claude writes on the spot, and it saves tokens.
The failure. Symptom: the skill loads but skips the validation step. Measure: run the same request five times and count the skips. Fix: move the rule to the top as a checklist, or call scripts/validate.py.
Chapter 6
Type a name and a description, and break each rule on purpose
Every rule so far comes together here. Type a name and a description. The forge checks the rules from the docs and the open specification, then writes the SKILL.md for you.
Break things on purpose. Put a capital letter in the name. Add the word "claude". Put a tag like <b> in the description. Delete the "Use when" part.
Edit the two fields. Each rule turns green or red as you type. The preview below shows the file you would save.
Hard rules: Agent Skills docs and agentskills.io. The "when" and third-person checks are our word tests for the docs' advice, not rules a validator enforces. The token count is a rough estimate of 4 characters per token.
Why each rule exists:
| Rule | Why |
|---|---|
| name: lower case, digits, hyphens; 64 max | it is also the folder name, so it must parse the same everywhere |
| no "anthropic" or "claude" in the name | reserved words, so a skill cannot pass for a first-party one |
| no XML tags in either field | the frontmatter goes into the system prompt; the guide says tags there could inject instructions |
| description: 1,024 characters max | it sits in context in every chat, for every installed skill |
| description says what and when | without the "when", the skill under-triggers (Chapter 3) |
A green forge is a valid frontmatter. It is not yet a good skill. That needs a body, use cases and the tests of the next chapter. Anthropic's open validator does the same frontmatter check from the command line: skills-ref validate ./my-skill.
The failure. Symptom: the upload rejects the skill. Measure: read the error, then run the validator. Fix: the forge's red line names the rule.
Chapter 7
Measure how often the skill fires when it should, and when it should not
The skill passes the forge. Does it fire at the right time? Write two lists of requests: ones that should trigger the skill, and ones that should not. Run each one and record if the skill loaded.
Call the requests that should trigger it n+, and the ones among them where it fired h. The hit rate is the share it caught.
R equals h divided by n-plus.
Run the n-plus requests that should fire the skill. Count the h that did. Divide h by n-plus.
With made-up numbers: 20 relevant requests, the skill fires on 18. R = 18 / 20 = 0.9, which meets the guide's target of 90% of relevant requests.
The other list catches the opposite fault. Call the requests that should not trigger the skill n−, and the ones where it fired anyway f.
F equals f divided by n-minus.
Run the n-minus unrelated requests. Count the f that fired the skill. Divide f by n-minus.
With made-up numbers: 10 unrelated requests, the skill fires on 1. F = 1 / 10 = 0.1. One user in ten gets a skill they did not ask for.
Ten requests for an invoice skill: six should fire it, four should not. Switch the two description edits and get every row green.
Illustrative test set; a word match stands in for the model. The two fixes are the guide's: keywords for under-triggering, negative triggers for over-triggering.
| Fault | Signal | Fix (Anthropic's guide) |
|---|---|---|
| Under-triggering, low R | users load the skill by hand; they ask when to use it | add the terms and file types users type |
| Over-triggering, high F | it fires on unrelated requests; users switch it off | add a negative trigger; narrow the scope |
Trigger tests are one of three kinds in the guide. Functional tests check the output. A comparison runs the same task with and without the skill. The best practices add two rules: write at least three evaluations before the long instructions, and test with every model you will use.
The failure. Symptom: the skill fires on almost every message. Measure: F on your list of unrelated requests. Fix: a negative trigger such as "Do NOT use for simple data exploration".
Chapter 8
Step through the workflow shapes that early skill builders found again and again
Anthropic's guide lists five patterns from early adopters and internal teams. First it asks one question: does the user come with a problem or with a tool? Problem-first: "set up a project workspace", and the skill picks the calls. Tool-first: "I have Notion connected", and the skill teaches the best workflows on it.
Pick a pattern, then press Step. A token carries the data from phase to phase. Watch where it waits for a check.
Phases and examples follow the guide; the drawing is ours.
| Pattern | Example in the guide | Key technique |
|---|---|---|
| 1 Sequential workflow | onboard a customer: account, payment, subscription, welcome email | fixed order, a check at each stage, rollback on failure |
| 2 Multi-MCP coordination | Figma export, then Drive, then Linear tasks, then a Slack note | separate phases; pass data between servers |
| 3 Iterative refinement | draft a report, run a check script, fix, repeat | explicit quality bar, and a rule for when to stop |
| 4 Context-aware tool choice | store a file: cloud for large, Notion for shared docs, GitHub for code | a written decision tree, a fallback, say why |
| 5 Domain intelligence | payments: check sanctions and risk before you process, then log | compliance before action; an audit trail |
Pattern 1 hides a data dependency: a later step needs a value from an earlier one. "Create subscription" needs the customer_id that "create account" returned. So the order is fixed, and the skill must carry that id from step 1 to step 3.
The failure. Symptom: the refinement loop never ends, or stops after one weak pass. Measure: count the laps per run, and score the output after each lap. Fix: a check script with a pass line, and a lap limit in the body.
Chapter 9
Put the skill where each product looks for it, and audit any skill you did not write
The skill works on your machine. Each Claude product finds skills in a different place, and a custom skill does not sync between them (Agent Skills docs).
Pick a product. The diagram shows where the folder goes, how Claude gets it, and what network the skill has.
From the Agent Skills docs and the Claude Code skills docs, read in November 2026. Plans and endpoints change; check the docs before you rely on them.
| Product | Where the skill goes | Note |
|---|---|---|
| Claude Code | ~/.claude/skills/<name>/ (personal) or .claude/skills/<name>/ (project), or a plugin | type /name to run it yourself; full network access |
| claude.ai | upload a zip in settings | paid plans with code execution on |
| Claude API | upload through the /v1/skills endpoints; list it in container.skills | needs the code execution tool; no network in the container |
Anthropic published Agent Skills as an open standard on 18 December 2025. A skill that needs one product can say so in the optional compatibility field.
A skill brings instructions and code, so a malicious one can tell Claude to run tools in ways its description hides. The docs advise skills only from trusted sources: your own, or Anthropic's. Before you install any other skill, read every file. Look for network calls, file access that does not fit the stated job, and instructions that fetch outside content.
The failure. Symptom: answers slow down and wander after a team adds many skills. Measure: count the skills enabled at once; the guide flags more than 20 to 50. Fix: enable only what each project needs.
Chapter 10
Keep the terms, the numbers, a checklist and the next steps in one place
A skill is a folder that teaches Claude one repeated job. Claude sees only its name and description until a request matches. Then it reads the body, and later only the files a step needs. Write the description for the choice, the body for the work, and test both.
| Term | Meaning | Number |
|---|---|---|
| Skill | a folder with SKILL.md and optional scripts/, references/, assets/ | 1 required file |
| Metadata (Level 1) | name and description, always in context | about 100 tokens per skill |
| Body (Level 2) | the SKILL.md instructions, loaded on a match | under 5,000 tokens; under 500 lines |
| Resources (Level 3) | files read, or scripts run, when a step needs them | 0 tokens until used |
| Standing cost | N times m | 30 skills: 3,000 tokens |
| name | lower case, digits, hyphens; no "anthropic" or "claude" | 64 characters max |
| description | what it does and when to use it, third person | 1,024 characters max |
| Hit rate R | relevant requests that fired, over all relevant | guide target: 90% |
| False-fire rate F | unrelated requests that fired, over all unrelated | aim near 0 |
name. (Chapters 1 and 6)SKILL.md---
name: sprint-planning
description: Plans sprints and creates tickets in Linear. Use when the user
says "plan this sprint", "create sprint tasks" or "sprint planning".
---
# Sprint planning
## Critical
Before you create any ticket, run `python scripts/estimate.py --tasks tasks.json`.
Do not create a ticket without an estimate.
## Steps
1. Fetch the project status from Linear.
2. Read `references/velocity.md` to compute the team's capacity.
3. Rank the tasks; fill each ticket with `assets/ticket.md`.
## Common issues
- "Connection refused": check that the Linear MCP server is running.
Now press Present or Teach and explain from memory: the folder, the three levels, the description and the two test rates. Then go back to the hero, set 100 skills, and say why the bar barely moves until a request matches.
Anthropic, Agent Skills overview and Skill authoring best practices; Use skills in Claude Code; Anthropic Engineering, Equipping agents for the real world with Agent Skills (16 October 2025, updated 18 December 2025); The Complete Guide to Building Skills for Claude (Anthropic, 2026); the open Agent Skills specification. The toy numbers and devices are ours.