Agent Skills

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.

Ask, and watch what loads

30

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

The Morning Briefing

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.

Say it aloud

T equals B times n times w.

T
T the tokens you paste over the whole period.
B
B the size of one briefing, in tokens.
n
n the new chats you start each week.
w
w the number of weeks.
In plain words

Each chat costs one briefing B. Multiply by the n chats a week and the w weeks. That is T.

With numbers

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.

Say it aloud

S equals n times w, times the bracket m plus u times B.

S
S the tokens the skill puts into context over the period.
n
n the new chats each week. n times w is the number of chats.
w
w the number of weeks.
m
m the metadata cost per chat: about 100 tokens, always loaded.
u
u the share of chats that need the workflow, from 0 to 1.
B
B the briefing, now the skill body, loaded only when needed.
In plain words

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 numbers

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.

Price the briefing

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.

800
40
0.25

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.

The road

  1. A skill is a folder: SKILL.md and three optional folders.
  2. Three levels: what loads always, when triggered, and on need. Hero: the window bar.
  3. The description: the one field Claude reads to decide. Hero: which skill fires.
  4. Plan with use cases: two or three concrete jobs, and the three categories.
  5. Instructions that get followed: specific steps, and scripts for guarantees.
  6. The skill forge: build a valid SKILL.md and break every rule.
  7. Test the trigger: hit rate and false fires on a test set.
  8. Five patterns: the workflow shapes that recur.
  9. Ship it safely: where skills live, and why you audit them.
  10. Field guide: terms, numbers, a checklist and where to go next.
What problem does a skill solve first?

Chapter 1

A Skill Is a Folder

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.

Open each part of the folder

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.

Which part of a skill is required?

Chapter 2

Three Levels of Loading

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).

LevelWhatWhen it loadsCost
1 Metadataname and descriptionalways, at startup, in the system promptabout 100 tokens per skill
2 Instructionsthe SKILL.md bodywhen the request matches the descriptionunder 5,000 tokens
3 Resourcesreference files, assets, scriptswhen a step reaches for themnothing 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.

Say it aloud

C-idle equals N times m.

Cidle
C-idle the standing cost: tokens all skills take before any of them fires.
N
N the number of installed skills.
m
m the metadata per skill: about 100 tokens.
In plain words

Each installed skill puts its name and description, m tokens, on the desk. Multiply by the N skills.

With numbers

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.

Say it aloud

C-active equals N times m, plus b, plus r.

Cactive
C-active the tokens on the desk while one skill does its work.
N × m
N times m the standing cost from above. It stays.
b
b the body of the one skill that fired: under 5,000 tokens.
r
r the reference files that the task read. Zero if it read none.
In plain words

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.

With numbers

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.

Fill the desk

Top bar: progressive disclosure. Bottom bar: every skill loaded in full. Drag the installed skills and choose how deep the active skill goes.

30

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.

Which part of every installed skill is always in context, used or not?

Chapter 3

The Description Decides

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.

Route a request

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):

FieldRule
nameat most 64 characters; lower-case letters, digits and hyphens; no XML tags; must not contain "anthropic" or "claude"
descriptionnot 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.

A skill has an excellent body but never loads when users ask for its job. What is most likely wrong?

Chapter 4

Plan With Use Cases

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.

CategoryUsed forExample from the guideKey techniques
1 Document and asset creationthe same high quality output each timefrontend-design; docx, pptx, xlsxstyle guides, templates, quality checklists
2 Workflow automationmulti-step work with a fixed methodskill-creatorsteps with validation gates, review loops
3 MCP enhancementguidance on top of an MCP server's toolsSentry's sentry-code-reviewcalls in order, domain knowledge, error handling

Sort the skill

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.

The frontend-design skill makes polished UI with no MCP and no outside tools. Which category is it?

Chapter 5

Instructions That Get Followed

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.

Close the open questions

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.

FreedomUse whenWrite
Highmany ways are valid, such as a code reviewa short list of goals
Mediuma preferred pattern existsa template or pseudocode with parameters
Lowa slip breaks things, such as a database migrationone exact command: "Do not modify the command"

Three more habits from the guide and the docs:

  1. Put the critical rule at the top, as a checklist, not deep in a paragraph.
  2. Say what to do on the common errors.
  3. Name each bundled file and say when to read it. That is progressive disclosure inside the body.

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.

A skill loads, but Claude keeps skipping a must-do validation. Which fix targets the cause?

Chapter 6

The Skill Forge

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.

Forge a valid skill

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:

    RuleWhy
    name: lower case, digits, hyphens; 64 maxit is also the folder name, so it must parse the same everywhere
    no "anthropic" or "claude" in the namereserved words, so a skill cannot pass for a first-party one
    no XML tags in either fieldthe frontmatter goes into the system prompt; the guide says tags there could inject instructions
    description: 1,024 characters maxit sits in context in every chat, for every installed skill
    description says what and whenwithout 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.

    Which name passes the docs' rules?

    Chapter 7

    Test the Trigger

    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.

    Say it aloud

    R equals h divided by n-plus.

    R
    R the hit rate: the share of relevant requests that loaded the skill, from 0 to 1.
    h
    h the relevant requests where the skill fired.
    n+
    n-plus the number of requests that should trigger the skill.
    In plain words

    Run the n-plus requests that should fire the skill. Count the h that did. Divide h by n-plus.

    With numbers

    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.

    Say it aloud

    F equals f divided by n-minus.

    F
    F the false-fire rate: the share of unrelated requests that loaded the skill. Lower is better.
    f
    f the unrelated requests where the skill fired by mistake.
    n−
    n-minus the number of requests that should not trigger it.
    In plain words

    Run the n-minus unrelated requests. Count the f that fired the skill. Divide f by n-minus.

    With numbers

    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.

    Tune the description to pass

    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.

    FaultSignalFix (Anthropic's guide)
    Under-triggering, low Rusers load the skill by hand; they ask when to use itadd the terms and file types users type
    Over-triggering, high Fit fires on unrelated requests; users switch it offadd 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".

    Your skill fires on 9 of 10 unrelated requests. What do you change?

    Chapter 8

    Five Patterns

    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.

    Step a pattern

    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.

    PatternExample in the guideKey technique
    1 Sequential workflowonboard a customer: account, payment, subscription, welcome emailfixed order, a check at each stage, rollback on failure
    2 Multi-MCP coordinationFigma export, then Drive, then Linear tasks, then a Slack noteseparate phases; pass data between servers
    3 Iterative refinementdraft a report, run a check script, fix, repeatexplicit quality bar, and a rule for when to stop
    4 Context-aware tool choicestore a file: cloud for large, Notion for shared docs, GitHub for codea written decision tree, a fallback, say why
    5 Domain intelligencepayments: check sanctions and risk before you process, then logcompliance 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.

    A report gets better each time you check it against a quality bar and revise. Which pattern fits?

    Chapter 9

    Ship It Safely

    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).

    Install it on each surface

    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.

    ProductWhere the skill goesNote
    Claude Code~/.claude/skills/<name>/ (personal) or .claude/skills/<name>/ (project), or a plugintype /name to run it yourself; full network access
    claude.aiupload a zip in settingspaid plans with code execution on
    Claude APIupload through the /v1/skills endpoints; list it in container.skillsneeds 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.

    Treat a skill like software you install

    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.

    A teammate sends you a skill from an unknown website. What do you do first?

    Chapter 10

    Field Guide

    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.

    TermMeaningNumber
    Skilla folder with SKILL.md and optional scripts/, references/, assets/1 required file
    Metadata (Level 1)name and description, always in contextabout 100 tokens per skill
    Body (Level 2)the SKILL.md instructions, loaded on a matchunder 5,000 tokens; under 500 lines
    Resources (Level 3)files read, or scripts run, when a step needs them0 tokens until used
    Standing costN times m30 skills: 3,000 tokens
    namelower case, digits, hyphens; no "anthropic" or "claude"64 characters max
    descriptionwhat it does and when to use it, third person1,024 characters max
    Hit rate Rrelevant requests that fired, over all relevantguide target: 90%
    False-fire rate Funrelated requests that fired, over all unrelatedaim near 0

    Checklist before you share a skill

    1. Two or three use cases, each with a trigger, steps and a result. (Chapter 4)
    2. The file is SKILL.md; the folder name matches name. (Chapters 1 and 6)
    3. The description says what and when, in the third person, with the words users type. (Chapter 3)
    4. The body is under 500 lines; rare detail lives in reference files linked one level deep. (Chapter 2)
    5. Critical rules sit at the top; must-pass checks run as scripts. (Chapter 5)
    6. At least three evaluations, plus trigger lists for R and F, run on each model you use. (Chapter 7)
    7. Every file read by a person, if the skill came from outside. (Chapter 9)

    The core as files

    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.

    Keep going

    The takeaway. The description decides when a skill loads; the levels decide how much it costs; the tests decide if it works. Write once, keep it lean, and measure it.
    Why is the description the field to write most carefully?

    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.

    Sources

    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.

    Agent Skills: Teaching Claude Your Workflows
    Read the docs · Harness Engineering · Back to Gleams