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.

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.
resources/Templates, reference docs, examples — loaded selectively, often by the instructions themselves.

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.

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 / 49 Handbooks done

Explore the topic

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