Lesson 9.3: Reusable skills and capabilities for agents
Learn how to package know-how as reusable skills: progressive disclosure, descriptions that trigger, bundled scripts, testing, versioning and security.
By the end of this lesson you will be able to explain what a skill is and how it differs from a prompt, a tool and a sub-agent, structure a skill so that only what is needed is loaded, write a description that makes the skill trigger when it should and not otherwise, decide what belongs in instructions and what belongs in a script, test a skill, and manage a library of skills safely. You will work out that carrying all 30 skills of about 3,100 tokens each in every call costs 93,000 tokens, where loading only short descriptions and the one skill needed costs about 7,000, and that a trigger that fires on 90 per cent of the requests that need a skill and wrongly on 5 per cent of those that do not still wastes 90,000 tokens per 1,000 requests. You should have read Lessons 6.1, 6.4 and 9.1. No code is needed. The mathematics is sums and percentages.
Every organisation that uses agents ends up with know-how that it wants to reuse. How to write a board paper in the house style. How to reconcile a ledger. How to review a contract against the standard clauses. How to prepare a customer call. You can paste that know-how into each agent's instructions, but then every agent carries all of it all the time, and each team keeps its own slightly different copy. A skill is a better container. It is a packaged, reusable capability: a folder holding instructions, and where needed scripts and reference files, that an agent loads only when the task calls for it. This lesson explains how skills work and how to build ones that work well.
What a skill is
A skill is, in its simplest form, a directory. It holds a main instruction file, and may hold more:
contract-review/
├── SKILL.md (name, description, and the procedure)
├── checklists/
│ └── standard-clauses.md
├── scripts/
│ └── extractclauses.py
└── templates/
└── review-memo.docx
The main file starts with a short header giving the skill's name and a description of what it does and when to use it. The rest of the file is the procedure: the steps to follow, the standards to apply, examples of good output, and pointers to the other files. The scripts do work that code does better than a model. The reference files hold detail that is only sometimes needed.
An agent that supports skills keeps a list of what is available, with only the name and description of each. When a task arrives, it decides whether a skill applies, and if so, loads that skill's instructions, and then opens other files as the procedure calls for them. The skill's know-how enters the context only at that point.
Skills against the other building blocks
The agent toolkit now has several pieces, and it helps to see where skills fit.
Piece · What it is · Best forA prompt or instructions · Text in the context · Behaviour that always applies
A tool · A function the agent can call · One action on a system, such as fetching a record
A skill · Packaged know-how: instructions, scripts and references, loaded when needed · A repeatable way of doing a kind of task
A sub-agent · A separate agent with its own context · Isolating context or work, as in Module 5
A workflow · Fixed steps in code · A path you can write in advance, as in Lesson 6.4
A skill is closer to a procedure manual than to a function. A tool says "here is a way to look up an invoice". A skill says "here is how a careful analyst reviews invoices for a month-end close, including which tools to use, in what order, what to check and how to report". Skills often use tools. They can also start sub-agents. They are the right place to put knowledge that is specific to your organisation and used across many agents.
Progressive disclosure: loading in layers
The key design idea is progressive disclosure: show the agent only as much as it needs at each stage. A skill has three levels.
Level one: the name and description. A line or two, always in the context, so the agent knows the skill exists and when to use it. About 100 tokens.
Level two: the main instructions. The body of the skill file, loaded when the agent judges the skill relevant. Perhaps 3,000 tokens.
Level three: bundled files. The reference documents, templates and scripts, opened only if the procedure reaches a step that needs them. These can be large, because they cost nothing until used.
The arithmetic shows why this matters. Suppose an organisation has 30 skills, each with a 100-token description and a 3,000-token body, plus 5,000 tokens of reference files that are needed in about one run in five.
Everything loaded in every call: 30 × (100 + 3,000) = 93,000 tokens per call, before any work.
Progressive disclosure: 30 descriptions at 100 tokens is 3,000, plus the one body loaded, 3,000, plus reference files in 20 per cent of runs, 0.2 × 5,000 = 1,000. The total is about 7,000 tokens.
That is a reduction of 92 per cent. At an example price of ₹30 per million tokens, 93,000 tokens a call is ₹2.79 and 7,000 is ₹0.21. For an agent that makes ten calls a run and a thousand runs a day, the difference is ₹25,800 a day. More important, the agent's context is not cluttered with 29 skills it is not using, and the thirtieth skill costs almost nothing to add. You can build a large library without paying for it on every call.
Predict first: an organisation has 30 skills of 100-token descriptions and 3,000-token bodies. What is the total token load if all are in context, and if only the descriptions are loaded plus the one skill needed? Estimate before reading on.
The totals are about 93,000 and 6,000 tokens, or 7,000 when occasional reference files are counted.
Writing a skill that works
The description is the trigger
The description is the most important text in a skill, because it is the only part the agent sees when deciding whether to use it. If it is vague, the skill is not used when it should be. If it is too broad, the skill fires on tasks it does not suit and wastes tokens. A good description says three things.
What the skill does, in specific terms.
When to use it, with the phrases and situations that signal it.
When not to use it, if there is a near neighbour it could be confused with.
Compare a poor and a good description for the same skill.
Poor: "Helps with contracts."
Good: "Reviews a supplier or customer contract against the company's standard clause checklist and produces a review memo listing deviations, risk ratings and suggested redlines. Use when the user asks to review, check, vet or compare a contract, or mentions clauses, indemnity or termination. Not for drafting a new contract from scratch or for summarising a document without a review."
The second tells the agent what it does, when it applies and where it stops. Words the user is likely to say are in it, because the agent matches the request to the description. Models tend to under-use skills rather than over-use them, so descriptions are often best written a little assertively, naming the situations in which the skill should be used even if the user does not mention it by name.
How well does a description trigger?
Treat triggering as a classification problem, like routing in Lesson 5.3. Of 1,000 requests, suppose 40 per cent genuinely need a skill. The trigger loads it for 90 per cent of those, which is the recall, and wrongly loads it for 5 per cent of the others.
Requests needing the skill: 400. Loaded correctly: 360. Missed: 40.
Requests not needing it: 600. Loaded wrongly: 600 × 0.05 = 30.
Of 390 loads, 360 were right, so 92.3 per cent of loads were correct.
The 30 wrong loads waste 30 × 3,000 = 90,000 tokens.
The 40 misses are the bigger cost. Each is a request where the agent worked without the know-how and probably did worse. The 30 false loads are a smaller loss, but they add up. A description can be tuned: broaden the wording to cut misses, or sharpen the boundaries to cut false loads. Measure both rates on a set of real requests, as you would for any router.
The body: procedures, not essays
The main instructions should read like a good procedure written for a capable colleague who is new to your organisation.
Say what to do, in order, and explain why where it matters. A model that understands the reason for a rule applies it better to cases the rule did not foresee than one given a bare command.
Include the standards and the house style, with a short example of good output. One or two examples teach more than a page of description.
Say what to do when things go wrong: missing information, ambiguous input, a failed tool. And when to stop and ask or hand back.
Keep it short. Aim for a body of a few hundred to a few thousand tokens. If it grows past that, move detail into bundled files and point to them.
Point to files with clear conditions. "For indemnity clauses, read checklists/indemnity.md." Then the agent loads that file only when it reaches an indemnity clause.
Do not repeat what the agent already knows. Spend words on what is specific to your organisation, such as your standards, your systems and your traps.
Scripts: what code does better
Some work is better done by code than by a model: arithmetic, parsing a file format, validating a schema, applying a formula, sorting and deduplicating, generating a chart. A skill can bundle scripts for these. The agent runs the script and uses its output. Benefits are exactness and repeatability, a saving in tokens since the script's code need not be in the context, and a smaller chance of error. For example, a month-end skill might include a script that totals the ledger and flags differences, so the model does not add up a thousand numbers itself, as Lesson 5.2 advised.
Scripts bring a responsibility. Code runs with the permissions of the environment, so a skill with a script is a program. Review it as you would any code, as the security section below explains.
Templates and assets
A skill can carry templates, such as a memo layout, a report skeleton or a form, which the agent fills in. This keeps output consistent across agents and over time, which is one of the main reasons organisations adopt skills.
Organising a library
As the library grows, structure keeps it usable.
One skill, one job. A skill that tries to cover contract review, drafting and negotiation will have a fuzzy description. Split it.
Clear names and consistent descriptions, so that a human browsing the library can find what they need.
No overlap without a rule. If two skills could both apply, the descriptions should say which wins.
Group by area where there are many: finance, legal, support.
Mark ownership and version, and a review date.
Compose skills. A larger skill can say "first use the extraction skill, then the review skill". Keep each piece reusable.
If the library becomes so large that descriptions alone are heavy, as the simulator's warning shows at about 200 skills of 100 tokens, add a search step: a small tool that finds likely skills for a request, so that the agent sees only a few descriptions.
Testing a skill
A skill is code of a kind, and needs tests.
Test the triggers. Write 30 to 50 realistic requests, some that should load the skill and some that should not, including near misses. Measure recall and false loads, as above, and refine the description.
Test the outputs. Run the skill on real tasks and grade the results with the methods of Lesson 7.1: outcome checks, a rubric and trajectory checks. Include hard and unusual inputs.
Compare with and without. The test of a skill is whether the agent does better with it. Run the same tasks with the skill and without, and compare quality, cost and time. A skill that does not improve results is not worth its tokens.
Test the scripts like any code, with unit tests and bad inputs.
Test across models. A skill written and tested on one model may behave differently on another. Check on the models you use.
Read the traces. See whether the agent loaded the skill, followed it and used the bundled files. If it ignores part of the skill, the wording may be unclear or too long.
Versioning, sharing and maintenance
Skills are shared assets, so they need the care described for contracts in Lesson 9.2. Version each skill and record changes. Keep a changelog. Test before releasing a new version, and roll out gradually for skills many agents use. Name an owner for each. Review them regularly, because policies change, tools change and a stale skill is worse than none: it teaches the agent to do the wrong thing with confidence. Retire skills nobody uses.
Share by a common store, such as a repository, that agents read from. This lets one improvement help every agent that uses the skill.
Security
A skill is instructions plus, often, code. Both can do harm.
Instructions can be malicious. A skill from an unknown source may contain hidden instructions to leak data or ignore the user's wishes. This is like the poisoned tool descriptions of Lesson 6.1.
Scripts run with real permissions. A script can read files, send data and change systems.
Skills can drift. A skill edited without review can introduce an error that spreads to every agent that uses it.
Controls: install skills only from sources you trust, read every skill and script before approving it, run scripts in a sandbox with the least access they need, restrict which agents may use which skills, pin versions, keep the library under change control with review and keep a record of who changed what. High-risk skills, such as those that touch money or personal data, should go through the same approval as other changes to high-risk agents, under Lesson 8.4.
Three worked examples
Example 1: a month-end close skill
A finance team packages its month-end process as a skill. The description names the situations: close, reconcile, accruals, variance. The body lists the steps, the checks and the house format. A script totals the ledger by account and flags differences above a threshold, and a template provides the close memo. Before the skill, five agents each had their own close prompts, and three of them applied different materiality thresholds. After, all use one skill. The team runs it with and without on 20 past closes: with the skill, the memo matches the controller's own in 18 of 20 cases, against 11 of 20 without.
Example 2: a trigger that missed
A contract review skill had the description "Reviews contracts". Of 50 test requests that should have used it, it loaded for 31, a recall of 62 per cent. The misses used words such as "vet this agreement" and "check these terms". The team rewrote the description to name those phrases and situations, and added "Not for drafting new contracts". Recall rose to 92 per cent and false loads stayed at 4 per cent.
Example 3: a skill that was too big
A support skill had grown to 11,000 tokens, covering refunds, shipping, returns and warranty. It loaded for every support request and carried material the request did not need. The team split it into one short main skill, 1,200 tokens, with the common steps, and four bundled files, one for each area, opened on demand. The typical load fell from 11,000 to about 3,000 tokens, and the accuracy on refund requests rose, as the model no longer had warranty detail to confuse it.
A checklist for skills
1. Decide that the know-how is reusable and specific to your organisation. If it is a single action, make it a tool. If it always applies, put it in instructions.
2. Structure the skill in three levels: name and description, main instructions, bundled files.
3. Write a description that says what it does, when to use it and when not to, with the words users say.
4. Write the body as a short procedure with the reasons, an example and what to do when things go wrong. Move detail into files.
5. Put exact work into scripts and consistent output into templates.
6. Keep one job per skill, make overlaps explicit and add a search step if the library is large.
7. Test triggers, outputs, scripts and models, and compare with and without the skill.
8. Version, own, review and retire skills, and keep them under change control.
9. Review for security, sandbox scripts and restrict who may use which skill.
Common mistakes
Pasting all know-how into every prompt. It costs tokens on every call and clutters the context.
A vague description. The skill never fires, or fires on everything.
Overlong bodies. Move detail into files loaded on demand.
Doing arithmetic and parsing in the model. Use a script.
Skills that do three jobs. Split them.
No test against doing without. A skill may add cost and no benefit.
Never updating. A stale skill teaches mistakes confidently.
Installing skills unread. They are instructions and code.
No owner or version. You cannot tell who is responsible or which copy is in use.
Key takeaways
A skill is a packaged, reusable capability: instructions, and where needed scripts, references and templates, loaded only when the task needs it.
Skills differ from prompts, tools, sub-agents and workflows. They are procedure manuals, and they use tools.
Progressive disclosure loads in three layers: description, body and bundled files. For 30 skills it cuts about 93,000 tokens per call to about 7,000.
The description is the trigger. State what the skill does, when to use it and when not to. Measure recall and false loads: in the example, 360 of 400 needed requests loaded, 40 were missed and 30 wrongly loaded.
Write bodies as short procedures with reasons and examples, use scripts for exact work and templates for consistent output.
Test triggers and outputs, and compare with and without the skill. Version, own and review skills.
Treat skills as code and instructions together: vet them, sandbox scripts and control changes.
Check yourself
1. What are the three levels of progressive disclosure?
The name and description, always loaded. The main instructions, loaded when the skill is relevant. Bundled files, opened only when a step needs them.
2. Why is the description the most important part of a skill?
It is the only part the agent sees when deciding whether to use the skill, so it decides whether the skill loads when it should and not otherwise.
3. 20 skills, each with a 120-token description and a 2,500-token body. What does loading everything cost in tokens, and what does loading the descriptions plus one body cost?
Everything: 20 × 2,620 = 52,400. Descriptions plus one body: 20 × 120 + 2,500 = 4,900.
4. Of 500 requests, 30 per cent need a skill and it loads for 80 per cent of those. How many needed requests are missed?
150 need it, 80 per cent loaded is 120, so 30 are missed.
5. Why put arithmetic in a script and not in the model's instructions?
Code is exact and repeatable, saves tokens and avoids the arithmetic mistakes a model sometimes makes.
6. Name two security risks of skills.
Any two of: malicious or hidden instructions, scripts running with real permissions, and unreviewed edits that spread an error to every agent using the skill.
Try this
Set aside seventy-five minutes.
1. List five procedures your organisation repeats that agents might do. Pick the one that most needs a consistent method.
2. Sketch the skill: folder layout, description, the steps in the body, any script and any template.
3. Write the description. Then write 20 requests, ten that should trigger it and ten that should not, including three near misses.
4. Use the trigger simulator with your estimated rates to see misses and false loads, and refine the description.
5. Decide what belongs in the body and what in bundled files, and where a script would replace model work.
6. Use the loading simulator to see how many tokens progressive disclosure would save across your library.
7. Write the test: ten real tasks run with and without the skill, and how you will grade them.
A good result is a skill specification: layout, description, procedure, scripts, tests and an owner. Lesson 9.4 closes the module with a question that every skill and every agent eventually raises: how to improve them from what happens in use.
Tags: Agentic AI Agent skills Progressive disclosure Reusable capabilities Agent design