Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

AI Engineering~11 min readIntermediate
Deep Dive

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.

01

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.

→ The core idea

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.

02

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:

Twenty workflows, two architectures

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:

inline = N·body  ·  skills = N·desc + (1 matched body)  →  50 workflows: 25,000 vs ~1,100 tokens/request

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.

03

Anatomy of a skill

The format is deliberately boring — markdown with a small frontmatter header:

A skill folder, from the top
nameShort, kebab-case identity — how the skill is invoked and referenced.
descriptionThe retrieval surface. One or two lines saying what the skill does and when to use it — this is all the agent sees until it commits.
SKILL.md bodyThe instructions: steps, rules, examples, edge cases. Loaded only on trigger.
scripts/Optional executables the instructions can invoke — deterministic work stays in code.
references/Optional reference docs and examples — loaded selectively, often by the instructions themselves.
assets/Optional templates and static files the skill uses in its output — read only when needed.

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.

04

Skills vs tools vs MCP vs fine-tuning

Four mechanisms extend an agent; they answer different questions:

MechanismWhat it addsReach for it when…
Tools / function callingNew capabilities — actions the model can't take alone.The agent needs to do something: query a DB, send a message, run code.
MCPA standard transport for tools/data across apps.Integrations multiply and should be shared, swapped, or third-party.
SkillsNew knowledge — procedures for using existing capabilities.The agent has the hands but not the playbook: workflows, checklists, house style.
Fine-tuningNew 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.

05

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.

Habits of skills that work
Describe for retrievalThe description is a matching surface, not marketing. Name the task and the trigger words: "Use when releasing a new version, cutting a release, or tagging."
One jobScope each skill to a single workflow. Split "testing" into "write unit tests" and "debug failing CI" — they trigger differently.
Steps, not vibesNumbered steps with explicit commands and file paths. The agent follows what's written, not what you meant.
Code for the deterministic partsAnything that must happen exactly — validations, builds, formatting — goes in a script the skill calls, not prose the model interprets.
Declare the edgesWhen NOT to use the skill, prerequisites, and what done looks like. Edge cases you omit become improvisation.
Test like a featureRun the tasks that should trigger it (and near-misses that shouldn't). A skill is prompt code — eval it like code.
06

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.

→ Treat as supply chain

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.

RUN IT YOURSELF

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.

CPython · WebAssembly
By the numbers

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.

StepEventWhat loadsContext cost
1Session startsAll 20 names and descriptions20 × 12 = 240
2Same 20 workflows inlined insteadEvery body, every request20 × 500 = 10,000
3“Cut release 2.4” matches cut-releaseThat one body240 + 500 = 740
4A changelog entry is neededThe reference file the body points to740 + 800 = 1,540
5The agent runs the bump scriptOnly the script’s output, not its code+ about 50 = 1,590
6Next request: “thanks!”Nothing matches; the menu stays240
7Two skills both say “helps with releases”Both bodies load, with conflicting steps240 + 1,000 = 1,240
8A day of 1,000 requests, half matching one skillInline: 1,000 × 10,000. Skills: 1,000 × 240 + 500 × 50010,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.

Trade-offs

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.

CaseTimeSpaceWhy
Inline in the system promptEdit one big prompt; every change redeploys all of itN × body on every request: 10,000 for 20 workflowsSimplest to start. Pays for every playbook on every task and dilutes attention.
SkillsAdd or edit one folderN × description + the matched body: 740 in the exampleCheap and modular. Depends entirely on the description matching, and needs one more read when a skill triggers.
Retrieval over a docs indexRe-embed changed documentsTop-k chunks per requestScales to huge corpora. Chunks arrive without the order and edges of a written procedure.
Tools / MCPWrite and deploy codeA schema per tool, usually loaded up frontGives the agent new actions. Says nothing about the order to use them in.
Fine-tuningA data set and a training run per changeZero prompt tokensBehaviour 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.

Watch for

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.md means 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.

In the wild

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.

Self-check

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.

Frequently asked

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.

Agent Skills · AI Engineering · Vibe Engines · 2026
Finished this one? 0 / 209 Handbooks done
NextAgent Skills vs MCP Next on the “Tools, protocols and interop” ladder · rung 5 of 7

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Handbooks