Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
Agent Skills: expertise your agent loads on demand.
Your agent doesn't need every playbook in its head at once — it needs the right one, at the right moment. Skills package procedures, checklists and house rules into folders the agent discovers by name and loads just-in-time. Here's the anatomy, when to reach for one, and the sharp edges.
What a skill actually is
Strip the branding and a skill is a folder. At its heart sits a SKILL.md — instructions for doing one kind of task well: your deploy runbook, a code-review checklist, a brand voice guide, the exact steps for cutting a release. Around it, optionally: scripts the agent can run, templates, reference files.
The trick is what the agent sees. Not the whole folder — just each skill's name and one-line description, a menu costing a few dozen tokens. When a task matches a description, the agent opens that skill and follows it. Expertise stored outside the window, selected on demand.
A skill is context engineering productized: write the expertise once, outside the prompt; select it just-in-time, only for the turn that needs it.
Anthropic shipped the pattern for Claude (and open-sourced the format), but nothing about it is vendor-specific — it's "a folder of instructions with a discoverable description," and variants of that idea are spreading through every serious agent stack.
Why the system prompt couldn't do this
The naive alternative is obvious: paste every workflow into the system prompt. Teams did. It fails on three axes at once:
All inlined
- Thousands of tokens on every request
- Nineteen irrelevant playbooks distracting each task
- Grows until nobody dares touch it
- One change redeploys the whole prompt
As skills
- ~1 line of context per skill until used
- Only the matching playbook enters the window
- Each skill versioned and edited independently
- Shareable across agents, teams, repos
This is progressive disclosure — the UI principle, applied to model context. The agent knows that a capability exists (cheap) without carrying how to do it (expensive) until the moment of use. The window stays lean; recall stays sharp; the attention budget gets spent on the task.
The saving is countable. Inlining pays for every playbook on every request; skills pay a one-line description each, plus the one body the task actually matches:
And the gap widens with every workflow you add — the whole point of the pattern. The runnable version below matches a task to a skill and prices both architectures.
Anatomy of a skill
The format is deliberately boring — markdown with a small frontmatter header:
Two design pressures shape a good SKILL.md. It must be self-sufficient: the agent arrives with zero memory of writing it, so context, prerequisites and success criteria all go in. And it must be scoped: one skill, one job. "Deploy the API" is a skill; "everything about our infrastructure" is a junk drawer that will never trigger cleanly.
Skills vs tools vs MCP vs fine-tuning
Four mechanisms extend an agent; they answer different questions:
| Mechanism | What it adds | Reach for it when… |
|---|---|---|
| Tools / function calling | New capabilities — actions the model can't take alone. | The agent needs to do something: query a DB, send a message, run code. |
| MCP | A standard transport for tools/data across apps. | Integrations multiply and should be shared, swapped, or third-party. |
| Skills | New knowledge — procedures for using existing capabilities. | The agent has the hands but not the playbook: workflows, checklists, house style. |
| Fine-tuning | New behavior in the weights. | Format/tone/domain must be reflexive, at volume, and prompting has hit its ceiling. |
The stack composes: MCP connects the tools, skills teach the workflows that use them, and the loop decides when each gets pulled in. Most teams need skills long before they need fine-tuning — editing a markdown file beats a training run.
Writing skills that actually trigger
The most common failure isn't a bad skill — it's a good skill that never fires, or fires for the wrong task. Almost all of that is the description.
The security angle: skills are dependencies
A skill is instructions your agent will follow and often scripts it will execute. Installing one is exactly as consequential as adding a package to your build — and the ecosystem is younger and less audited than npm.
Review third-party skills like code — because they are. Read the SKILL.md and the scripts, pin versions, prefer trusted publishers, and assume anything the skill reads (or fetches) can carry a prompt injection.
The standing defenses of agent security still carry the real weight: least-privilege tools, sandboxed execution, approval gates on irreversible actions, and treating retrieved content as untrusted input. A skill changes what the agent intends to do; the guardrails bound what it can do.
Price progressive disclosure
Skills are a token-budget trick, and the trick is measurable. This holds five workflows two ways: inlined into the prompt (every body on every request) versus as skills (a one-line description each, plus only the body whose keywords match the task). A matcher routes "generate a pdf report" to the pdf skill and loads just that playbook. Then it scales to 50 workflows, where inlining burns 25,000 tokens a request and skills spend ~1,100 — a gap that widens with every workflow you add. Change the task or the number of skills.
Worked example: one request through 20 skills, step by step
An agent has 20 skills. Each description costs 12 tokens and each body 500, the page’s own numbers. One of them, cut-release, says: bump the version with scripts/bump_version.sh, and read changelog-format.md (800 tokens) only if a changelog entry must be written. Trace what reaches the window.
| Step | Event | What loads | Context cost |
|---|---|---|---|
| 1 | Session starts | All 20 names and descriptions | 20 × 12 = 240 |
| 2 | Same 20 workflows inlined instead | Every body, every request | 20 × 500 = 10,000 |
| 3 | “Cut release 2.4” matches cut-release | That one body | 240 + 500 = 740 |
| 4 | A changelog entry is needed | The reference file the body points to | 740 + 800 = 1,540 |
| 5 | The agent runs the bump script | Only the script’s output, not its code | + about 50 = 1,590 |
| 6 | Next request: “thanks!” | Nothing matches; the menu stays | 240 |
| 7 | Two skills both say “helps with releases” | Both bodies load, with conflicting steps | 240 + 1,000 = 1,240 |
| 8 | A day of 1,000 requests, half matching one skill | Inline: 1,000 × 10,000. Skills: 1,000 × 240 + 500 × 500 | 10,000,000 vs 490,000 |
Three levels load at three different times: the menu always, a body when its description matches, and the bundled files only when the body sends the agent to them. Step 4 is the habit that keeps skills cheap: big reference material lives in files the body points to, not in the body. Step 7 costs more than the extra 500 tokens. The agent now holds two procedures for one task, and which one it follows is luck. Step 8 is roughly a 20× difference over the day, and it grows with every workflow you add.
Cost and trade-offs: where expertise can live
Time is the work to add or change a workflow, Space is the context it costs per request, and the last column is what you give up.
| Case | Time | Space | Why |
|---|---|---|---|
| Inline in the system prompt | Edit one big prompt; every change redeploys all of it | N × body on every request: 10,000 for 20 workflows | Simplest to start. Pays for every playbook on every task and dilutes attention. |
| Skills | Add or edit one folder | N × description + the matched body: 740 in the example | Cheap and modular. Depends entirely on the description matching, and needs one more read when a skill triggers. |
| Retrieval over a docs index | Re-embed changed documents | Top-k chunks per request | Scales to huge corpora. Chunks arrive without the order and edges of a written procedure. |
| Tools / MCP | Write and deploy code | A schema per tool, usually loaded up front | Gives the agent new actions. Says nothing about the order to use them in. |
| Fine-tuning | A data set and a training run per change | Zero prompt tokens | Behaviour becomes a reflex. Slow to change, hard to inspect, and it can’t be reviewed in a pull request. |
Skills win when the knowledge is procedural, changes often and is needed only some of the time. If something is needed on almost every request, a short line in the system prompt is cheaper than a skill that loads every time anyway.
Common mistakes
- Overlapping descriptions
Two skills that both claim “releases” or “testing” either both load (step 7 above) or the wrong one wins. Read the whole menu as the agent sees it, and make each description name a different trigger.
- A bloated body
Pasting the full style guide, API reference and examples into
SKILL.mdmeans all of it loads on every trigger. Keep the body to the steps and point to reference files that load only when a step needs them. - Secrets in the folder
Skills get copied between repos and shared across teams. An API key or internal URL inside a script or template goes wherever the skill goes. Read credentials from the environment and keep the folder safe to publish.
- No owner, so it rots
A runbook skill that still names last year’s deploy command fails just as confidently as a correct one. Version skills with the code they describe, review changes in pull requests, and re-run their trigger tests when the workflow changes.
- A playbook without the hands
A skill that says “query the billing database” does nothing if the agent has no tool that reaches it. It improvises or gives up. Check that every step maps to a tool or script the agent actually has, and say what to do if it doesn’t.
Where this shows up in production and interviews
- Claude Code
Skills live in
~/.claude/skills/for one person or.claude/skills/inside a repo, so a team’s skills are checked in and reviewed like the code they describe. A deploy or release skill there is just a folder in the repository. - Built-in document skills
Anthropic ships skills for working with Word, Excel, PowerPoint and PDF files. Each is a set of instructions plus scripts. The model reads only the one for the file type in front of it, which is the step 3 pattern.
- House rules at scale
Teams use skills for what used to be wiki pages nobody read: a code-review checklist, a brand voice, an incident runbook, the steps to cut a release. The agent loads the page at the moment it applies, instead of hoping someone pasted it in.
- The interview version
Asked how an agent should handle 50 internal workflows, do the step 2 versus step 3 arithmetic, then explain the matching surface and how you would test it (should-trigger and near-miss tasks). Then treat third-party skills as dependencies: review, pin, and sandbox their scripts.
Check yourself
You have 100 skills at 12 tokens per description and 500 per body. What does a request that matches one skill cost, against inlining everything?
100 × 12 + 500 = 1,700 tokens, against 100 × 500 = 50,000 inlined. The menu is now the bigger part of the bill, so at this scale keep descriptions short and remove skills nobody uses.
Your release skill never fires when people type “ship 2.4”. The body is excellent. What do you change?
The description. It is the only thing the agent sees before it commits, so it must contain the words people actually use: “ship”, “release”, “tag a version”. Then add “ship 2.4” to the skill’s trigger tests so it stays fixed.
Every request your agent handles needs the same three formatting rules. Skill or system prompt?
The system prompt. A skill pays off when its body is needed only some of the time. Needed on every request, it would load every time anyway, and you would pay for the description and an extra read on top.
A popular third-party skill’s script fetches a URL and passes the page to the agent. What is the risk, and what bounds it?
The fetched page can carry a prompt injection, and the agent follows the skill’s instructions with its own permissions. Read the script before installing it, pin the version, and rely on least-privilege tools, a sandbox and approval gates on irreversible actions. Those limit what the agent can do whatever the skill says.
Quick answers
What is an agent skill?
A folder of packaged expertise — a SKILL.md of instructions for one task, plus optional scripts and resources. The agent sees only the name and description until a task matches; then the full content loads just-in-time.
How are skills different from tools or MCP?
Tools and MCP add capabilities — actions the agent couldn't take. Skills add knowledge — procedures for using the capabilities it already has. Hands vs playbook.
Why not put everything in the system prompt?
Tokens and attention are finite. Inlined workflows cost thousands of tokens per request and distract every task; skills cost a line each until the moment of use.
Are third-party skills a security risk?
Yes — they're instructions your agent follows and scripts it runs. Review like code, pin versions, and keep least-privilege tools and approval gates regardless.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Agentic AI Interview HandbookTwenty topics every senior AI engineer should be able to reason about live — from eval pipelines to reliability patterns for generative systems.Read →
- The Agent Evaluations HandbookA self-contained handbook on evaluating AI agents — theory, interactive widgets, and practical guidance. Trajectory evals, tool-use scoring, LLM-as-judge, observability, and reliability for PMs, engineers, and founders.Read →
- The Agent Patterns HandbookThe design patterns behind every LLM agent — the ReAct Thought–Action–Observation loop, tool/function calling, plan-and-execute, reflection, memory, multi-agent orchestration, and the failure modes (loops, hallucinated tools, recovery, human-in-the-loop) that break agents in production.Read →
- The Model Context Protocol (MCP) HandbookThe open standard connecting AI agents to the outside world — why M×N bespoke integrations collapse to M+N, the host/client/server roles over JSON-RPC, the three primitives (tools, resources, prompts), the connect→discover→call session lifecycle, when MCP earns its keep, and the security sharp edges (a server's output is untrusted input).Read →
- The Loop Engineering HandbookStop prompting your agents — design the system that prompts them for you. The inner vs outer loop, the four loop types (heartbeat, cron, hook, goal), the six building blocks (automations, worktrees, skills, MCP connectors, subagents, external memory), stopping conditions and the verification split, state across runs, cost engineering, and the six failure modes that burn tokens at 3am.Read →
- The Context Engineering HandbookThe discipline that replaced prompt-tweaking: curating everything the model sees under a finite attention budget. The anatomy of a production context window, the three taxes on an overstuffed one (context rot, cost, behavioral drift), the four operations (write, select, compress, isolate), agent-specific patterns like compaction and just-in-time retrieval, six production habits, and where it sits in the prompt → context → loop → harness stack.Read →