Join at muse.ai, then redeem invite code 703LUM to get 1 billion Muse tokens. How it works

Agent Skills Explained: What They Are, How They Differ From MCP, and When to Write One

By Carter Wang · Published · 13 min read · guides

Editorial cover — hands sorting blank instruction cards on a desk beside a laptop, coffee mug on the desk

Key takeaways

  • A skill is a folder with a SKILL.md: a name and a description up front, the procedure inside, optional scripts, references, and assets beside it. The format is an open standard at agentskills.io, vendor-neutral since Anthropic donated it to the Agentic AI Foundation on October 22, 2026.
  • The agent keeps only each skill's name and description in context — about 100 tokens — until a task matches. The full file loads then, and bundled files only when the instructions point at them.
  • Skills teach method; MCP gives reach. Anthropic's line: a skill explains how to follow a procedure, MCP is what the agent reaches for when it needs a database or a file it doesn't have.
  • One folder works across Claude Code (.claude/skills/), Codex and Gemini CLI (.agents/skills/). Only the folder and the way you call the skill differ.
  • Write a skill when you paste the same procedure a third time, and keep the catalog small — one measured run found 78 of 131 installed skills had lost their descriptions to the context budget.

A skill is a folder with one file in it. The file is called SKILL.md, it opens with a name and a one-paragraph description, and the rest is the procedure — the steps, the checks, the format — written the way you would write it for a new teammate. Drop the folder where your agent looks, and the agent reads the description on every turn, loads the full file only when a task matches, and follows it. That is the whole idea, and it is now a standard no single company owns: Anthropic published the format in December 2025 and donated it to the Agentic AI Foundation on October 22, 2026. More than 70 agent platforms read it, by Anthropic’s count, and the same skill works in Claude Code, Codex, and Gemini CLI.

You needUseWhy
A procedure the agent follows when the task matchesSkillName and description always loaded, about 100 tokens; the body loads on use
Live tools or dataMCPThe server does the work; tool definitions cost context up front
A fact true on every taskCLAUDE.md or AGENTS.mdRead at the start of every session
A rule that must hold every timeHookRuns on the event whether or not the model remembers

Somebody measured what a big skill catalog actually costs instead of quoting the spec. Actually Shipped ran the test on November 2, 2026, on a Mac with Claude Code 2.1.312 and Codex CLI 0.160.1: about 80 skills of their own, plus a plugin, skills synced from claude.ai, and the built-ins — 131 in the list. The listing took 10,000 tokens, exactly the 1% of the context window Claude Code budgets for it, and 78 of the 131 skills were there by name only: the least-invoked had lost the descriptions that help Claude pick them. Raising the budget to 3% brought every description back and grew the listing to 18,700 tokens. The same run’s trigger test — ten prompts that should fire a license-headers skill, ten that should not — came back 10 of 10 and 0 of 10 on both Claude Code and Codex. My check on it: one machine, one run per prompt, and the author says so themselves — the shape holds (the catalog is the cost, not the skill), but treat the exact token counts as one setup’s numbers, not a benchmark. The rest of this page is what the format is, where each agent looks, and when a procedure earns a skill of its own.

What a skill actually is

The smallest valid skill is one file:

~/.claude/skills/
└── check-links/
    └── SKILL.md

A larger one adds supporting material in three optional folders: scripts/ for code the agent runs, references/ for material it reads only when the instructions point there, and assets/ for files the skill produces or uses, like templates. The specification itself is short enough to read in ten minutes, and that is the point — there is almost nothing to learn beyond the file.

SKILL.md has two parts. The top is YAML frontmatter between --- markers, and the rest is the instructions. Two fields are required by the open standard: name, 1 to 64 characters, lowercase letters, numbers, and hyphens, matching the folder name; and description, up to 1,024 characters, saying what the skill does and when to use it. The optional fields are license, compatibility (up to 500 characters, for notes like “requires Python 3.14+”), metadata, and an experimental allowed-tools list of pre-approved tools. One detail that will bite you: Claude Code reads the frontmatter only when the opening --- is the very first line of the file. A blank line or a comment above it, and the whole file is treated as body text.

Loading works in three stages, and the stages are where the cost argument lives. At the start of a session the agent sees only each skill’s name and description — about 100 tokens per skill, always loaded. When a request matches a description, the agent reads the full SKILL.md; the spec recommends keeping it under 500 lines. Bundled files load only when the instructions point at them, and script code never enters the context window at all — only its output does. You can ship a long reference file inside a skill and pay nothing for it unless the agent opens it.

Four dates mark how far this has come. Anthropic first shipped skills inside its Claude products in October 2025, published the format as an open standard on December 18, 2025, and on August 19, 2026 moved the Skills API to general availability on the Claude Developer Platform — the /v1/skills endpoint, no beta header required. Then, on October 22, 2026, at AGNTCon + MCPCon North America in San Jose, Anthropic donated the standard to the Agentic AI Foundation, the Linux Foundation body that already hosts MCP. The donation covers the name, the logo, the GitHub organization, and the agentskills.io domain. Anthropic’s figures at the time: more than 70 agent platforms integrated, 1 million skills published, nearly 280 million installed. Nothing in the file format changed that day — what changed is who decides the next version. Two lead maintainers, David Soria Parra and Mahesh Murag, run it now, with engineers from Anthropic, Google, OpenAI, and other companies maintaining it as individuals. The proposed roadmap is versioned releases, a formal proposal process, and security guidance for skill authors and installers. Proposed is the word — none of the three has shipped yet.

Skills vs MCP: method, not access

This is the confusion the title promises to settle, and Anthropic’s own litmus test draws the line plainly: a skill explains how to follow a procedure; MCP is what the agent reaches for when it needs a database or a file it doesn’t have. A skill is know-how. An MCP server is reach. The full split is in MCP vs A2A vs Poppy; the part that matters here is the cost and the layering.

Agent SkillsMCP
What it isStatic Markdown instructionsLive client-server protocol
What it doesTeaches a procedureDelivers tool and data access
Question it answersHow should the agent do this?What can the agent reach, and is it allowed to?
Context cost before useAbout 100 tokens per skillFull tool schemas, every request
Where it runsInside the agent’s environmentOn the MCP server, local or remote
AuthNone of its ownOAuth, scoped tokens, server-held credentials

The cost row is the one with measured numbers behind it. Anthropic’s own example puts 58 tools from five MCP servers at about 55,000 tokens before the agent does anything useful — GitHub at 35 tools for roughly 26,000 tokens, Slack at 11 tools for roughly 21,000, the rest smaller — and Anthropic’s internal setup ran to 134,000 tokens of tool definitions before optimization. A skill’s metadata costs about 100 tokens. That is why the two are not rivals: you pay the MCP cost for live access you actually need, and you pay almost nothing for a procedure until the task arrives.

They stack in both directions. A skill can call MCP tools — the procedure says which tool to use and in what order — and a skill can point at an MCP server as the system the procedure touches. The protocol map already shows this: a company publishing a Poppy file can list an MCP server as one kind of API it offers, once identity and consent are settled. If your agent needs one tool, MCP is the default answer. If your agent needs to do the same job the same way every time, that is a skill, and the skill can drive the MCP tools.

Wrong fit: a skill for live data, or MCP for a procedure. A skill cannot fetch a database row on its own — it can only run a script or call a tool that does. And an MCP server cannot teach your agent how your team writes a release note, in what order, with which checks. Teams that reach for MCP to encode a procedure end up with a server that pretends to be a checklist; teams that reach for a skill to reach a live system end up pasting credentials into a Markdown file.

Where each agent looks for skills

The format is shared. The folders are not, at least not completely. This is the table to bookmark, taken from each vendor’s own docs:

AgentProject skillsPersonal skillsCall it yourself
Claude Code.claude/skills/<name>/~/.claude/skills/<name>//name
Codex.agents/skills/~/.agents/skills/$name
Gemini CLI.gemini/skills/ or .agents/skills/~/.gemini/skills/ or ~/.agents/skills/Name it in the request
Cursor.agents/skills/ or .cursor/skills/~/.agents/skills/ or ~/.cursor/skills//name

Claude Code is the outlier: it reads .claude/skills/ and does not read .agents/skills/. Cursor reads either, and also reads .claude/skills/ for compatibility. The practical fix is one symlink — put the real folder in .agents/skills/ and point Claude Code at it — or install the skill in both places and accept the duplication. Codex walks .agents/skills/ from the working directory up to the repository root, so a skill committed at the root covers every project inside it. Gemini CLI discovers skills in tiers — built-in, extension, user, workspace — and within a tier the .agents/skills/ alias wins over .gemini/skills/; gemini skills install <git-url> --consent installs one from a repository, and /skills list shows what is loaded. Gemini CLI asks for consent before activating a skill the model picks.

Skills also live beyond the terminal. On claude.ai, paid plans can upload skills as a zip in settings, with code execution enabled; the Claude API takes skills through the Skills API and the code execution tool, up to 20 per request, with Anthropic’s own document skills (pptx, xlsx, docx, pdf) alongside custom ones. Cowork and cloud sessions use the skills enabled on your claude.ai account. One gap to know: skills uploaded to claude.ai and skills on your filesystem for Claude Code do not sync with each other — the same skill in both places is two copies to maintain. The two coding agents this site compares most often, Claude Code vs Codex, are also the two whose skill folders differ by one path segment, so the symlink above is the cheapest fix in the whole article.

Skills in the Claude Agent SDK

If you embed an agent instead of running one in a terminal, the same folders apply. The Claude Agent SDK vs OpenAI Agents SDK comparison covers the two harnesses; the skills part of the Claude side works like this: the SDK loads skills from the filesystem locations governed by settingSources (TypeScript) or setting_sources (Python). Omit the setting and query() reads the same filesystem settings as the Claude Code CLI — user, project, and local settings, CLAUDE.md files, and .claude/ skills, agents, and commands. The SDK discovers skill metadata at startup from the user and project directories and loads the full content when Claude invokes the skill.

Control comes through the skills option on query(): "all", a list of exact skill names, or [] to disable them. Discovered skills are enabled by default, and the skills list option requires Claude Code v2.1.309 or later. Near the start of the stream, the SDK yields an init system message whose skills array confirms which user-invocable skills loaded — check it before Claude starts working, the same way you would check a tool list. You can also dispatch a skill directly by sending /<name> in a prompt. Unlike subagents, which you define in the agents option, there is no programmatic API for registering a skill — it is a file on disk, or it does not exist.

When to write one — and when not to

The rule that survives every version of this advice: write a skill when you catch yourself pasting the same procedure into the chat a third time. The first two times, the paste is cheaper than the file. The third time, the file is cheaper than the paste — and the fourth time, the skill is already there. The description is the trigger, so write it first, and put the words a person would say at the front: what the skill does, and when to use it.

You wantUseWhy
A procedure Claude should follow when the task matchesSkillOnly its name and description are always loaded; the body loads on use
A fact about the project, true on every taskCLAUDE.md or AGENTS.mdRead at the start of every session
A rule that must hold every timeHookRuns on the event whether or not Claude remembers
Work in a separate context, with a report backSubagentKeeps the noise out of your main conversation
A one-off jobA promptNo file to maintain

Two boundaries in that table do the most work. First, a fact belongs in the instruction file: once a section of CLAUDE.md has grown into numbered steps that only matter on some tasks, it is a skill, because a skill’s body is read only when it is used. Second, a rule that must hold every time is not a skill at all — if Claude skips it, move it into a hook, which a skill can define in its own frontmatter. And slash commands no longer compete with skills: .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both give you /deploy, and the skill adds supporting files and automatic loading on top.

Do not write a skill for a fact, a preference, or a one-off. Do not write one for a procedure only you run once a quarter — the description will sit in the catalog budget, unread, until the budget cuts it. The test for whether a skill earns its place is the same as the test for whether it fires: ten prompts that should trigger it, ten that should not — a small version of the starter suite in How to Evaluate AI Agents. The skill-creator plugin tunes a description exactly that way, generating should-trigger and should-not-trigger prompts and measuring the hit rate.

Write your first skill in ten minutes

Pick the procedure you pasted most recently. A license-header check is a good first one — small, repeatable, easy to score.

  1. Make the folder: .claude/skills/license-headers/ in the project, or ~/.claude/skills/license-headers/ for yourself. For Codex and Gemini CLI, the same folder goes in .agents/skills/.
  2. Write the description first. Say what it does and when to use it, in the words you would say out loud: “Adds, checks or updates license and copyright headers at the top of source files. Use when the user asks about license headers, copyright notices or SPDX identifiers in code files.”
  3. Write the body as numbered steps, with the checks and the don’ts: list the source files, report which ones lack an SPDX header, do not edit in this run, describe the change instead.
  4. Ask for something that matches the description and watch it load on its own — or call it directly with /license-headers.
  5. Run claude plugin validate ~/.claude/skills to catch frontmatter that failed to parse. A skill with broken frontmatter still loads, but with empty metadata, so Claude cannot match it by description.
  6. Check /context to see whether your catalog fits the budget, and /skill-doctor to see which skills never run. Disable or remove what is not used.

A skill with side effects — a deploy, a message to a customer — should be invoked by you, not by the model. Set disable-model-invocation: true in the frontmatter and Claude will not call it on its own. That also keeps its description out of the context, so it stops using budget. user-invocable: false is the opposite: it hides the skill from the / menu, but the description stays in context.

Two mistakes that cost the most

The first is the catalog. One skill is cheap; eighty share one fixed budget, and the least-used lose their descriptions first. The measured run above is the shape of it: 131 skills in the list, 78 by name only, 96 never invoked at all. A skill that fit the last project is a description that now competes for the budget with everything else. Prune the catalog, and when you start a new project, do not copy the old project’s skills over. Pick them again for the new work.

The second is installing a skill you have not read. A skill is code with instructions on top: it can run scripts, and a project skill’s allowed-tools applies even in a -p run inside a folder you have never trusted — a repository you only cloned can ship a skill that grants itself tools. Read allowed-tools, every script in the folder, and the commands in the body before it goes on your machine. Anthropic’s guidance is to use only skills you created or got from Anthropic. Scheduled tasks and /loop now ask before running a skill that declares allowed-tools or hooks (Claude Code 2.1.325, November 13, 2026) — that prompt is the last line of defense, not the first.

Pick rules

  • Write a skill when a procedure repeats and the description can say when it applies. Keep the file under 500 lines, the description under 1,024 characters, and the name the words of the task.
  • Use MCP when the agent needs live tools or data, and let the skill drive those tools. The skill is the method; MCP is the access.
  • Put facts in CLAUDE.md, must-hold rules in hooks, one-offs in the prompt. A skill is none of those.
  • Keep the catalog small. Check /context after adding skills, run /skill-doctor once a month, and remove what never runs — a name without a description is a skill Claude cannot pick.

How I checked this

This page explains what an Agent Skill is, how it differs from MCP, and when to write one. I used the Agent Skills specification at agentskills.io, Anthropic’s October 22, 2026 donation announcement, the Claude Code and Codex skills docs, the Gemini CLI skills docs, and the Claude Agent SDK skills docs — all read November 30, 2026 — plus Actually Shipped’s November 2, 2026 measured run on Claude Code 2.1.312 and Codex CLI 0.160.1 for the catalog-cost numbers.

I pick by what the task needs: a skill when a procedure repeats, MCP when the agent needs live data, and both when a procedure touches a real system.

Products in this guide

FAQ

What is an Agent Skill?

A folder with a SKILL.md file that teaches an agent one procedure: YAML frontmatter with a name and a description, then Markdown instructions, plus optional scripts, references, and assets. The format is an open standard, maintained at agentskills.io under the Agentic AI Foundation since October 22, 2026.

How is a skill different from an MCP server?

A skill is instructions — how to do a job. An MCP server is access — tools and data behind a live connection. A skill costs about 100 tokens of context until it is used; MCP tool definitions are loaded up front on every request. The two stack: a skill can tell the agent how to use the tools an MCP server exposes.

Where do I put a SKILL.md so Claude Code finds it?

In a project, .claude/skills//SKILL.md — commit it to share with the team. For yourself on every project, ~/.claude/skills//SKILL.md. Call it with /, or let the description match the task and Claude loads it on its own.

Do skills work in tools other than Claude Code?

Yes. The same folder works in Codex and Gemini CLI from .agents/skills/, and in Cursor from .agents/skills/ or .cursor/skills/. Claude Code reads .claude/skills/ instead, so one symlink or a copy bridges the two homes.

Is it safe to install a skill someone else wrote?

Read it like code first, because it can run code. Check allowed-tools, every script in the folder, and the commands in the body. Anthropic’s guidance is to use only skills you created or got from Anthropic — a project skill’s allowed-tools can apply even in a run inside a folder you never trusted.