Claude Skills Explained: The 2026 Guide to Agent Skills, SKILL.md, and MCP
Anthropic opened the Agent Skills standard in Q1 2026, and within three months the GitHub trending page was wallpapered with skills repos. Karpathy's CLAUDE.md skills pack passed 62,000 stars. Addy Osmani's production skills collection hit 18,000. Vercel launched skills.sh as the open directory and find-skills alone crossed half a million installs.
The problem: almost nobody can cleanly explain what a Skill is, how it differs from MCP, or when you should reach for one over a plain tool call. This guide fixes that โ with a minimal working SKILL.md, a comparison table that separates Skills from MCP, Tools, and Subagents, and a decision framework you can actually apply.
๐ What You'll Need
- Claude Code installed locally (or Claude Pro/Max/Team/Enterprise for the hosted version)
- A terminal and a text editor
- Familiarity with YAML frontmatter (the same syntax used in Jekyll, Hugo, or your
CLAUDE.md) - Optional: a GitHub account if you want to publish to
skills.shlater
If you're brand new to the surrounding tooling, start with the Claude Code Workflow Guide and come back. Everything below assumes you can drop a file into .claude/ and run a slash command.
๐งฉ What a Claude Skill Actually Is
Strip the marketing and a Claude Skill is a folder that contains:
- A required
SKILL.mdfile (YAML frontmatter + Markdown instructions) - Optional supporting files: scripts, templates, reference docs, examples
The frontmatter tells Claude when to use the skill. The Markdown tells Claude how to do the task. That's the entire primitive.
my-skill/
โโโ SKILL.md # Required: instructions + frontmatter
โโโ reference.md # Optional: loaded only if needed
โโโ examples/
โ โโโ sample.md # Optional: example outputs
โโโ scripts/
โโโ helper.py # Optional: Claude can execute
Where you drop the folder controls who can use it:
| Location | Path | Applies to |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md |
All your projects |
| Project | .claude/skills/<name>/SKILL.md |
This repo only |
| Plugin | <plugin>/skills/<name>/SKILL.md |
Wherever the plugin is enabled |
| Enterprise | Managed settings | All users in the org |
Higher-priority locations win on name conflicts: enterprise > personal > project. Plugin skills get their own plugin:skill-name namespace so they can never clash.
CLAUDE.md has grown into a step-by-step procedure rather than a fact, that's a skill waiting to happen. CLAUDE.md is for facts Claude needs every turn. Skills are for procedures that only load when invoked.
โ๏ธ Your First Skill: A Minimal SKILL.md
Here's a working skill that teaches Claude to explain code with analogies and ASCII diagrams. Drop it in ~/.claude/skills/explain-code/SKILL.md:
---
name: explain-code
description: Explains code with visual diagrams and analogies. Use when the user asks how something works, is onboarding to a new codebase, or says "walk me through this".
---
When explaining code, always include:
1. **Start with an analogy** comparing the code to something from everyday life.
2. **Draw an ASCII diagram** of the flow, structure, or relationships.
3. **Walk through step-by-step** what actually happens at runtime.
4. **Highlight one gotcha** โ a common mistake or misconception.
Keep it conversational. For complex concepts, use more than one analogy.
You now have two ways to invoke it:
- Direct: type
/explain-code src/auth/login.tsin Claude Code - Automatic: Claude loads it when you ask a matching question like "how does this work?"
That's the whole loop. No SDK, no config file, no build step. One Markdown file and you've extended Claude.
Frontmatter fields you'll actually use
Only description is recommended. Everything else is optional but earns its keep in specific cases:
| Field | What it does |
|---|---|
name |
Display name + slash command. Defaults to directory name. |
description |
When Claude should auto-invoke. Front-load the key use case โ truncated at 1,536 chars. |
when_to_use |
Extra trigger phrases, appended to description. |
disable-model-invocation |
true = only the user can invoke. Use for /deploy, /commit, anything with side effects. |
user-invocable |
false = only Claude can invoke. Use for background knowledge that isn't an action. |
allowed-tools |
Tools Claude can use without asking (e.g. Bash(git add *) Bash(git commit *)). |
model |
Override model for this skill. |
effort |
low / medium / high / xhigh / max โ overrides the session effort level. |
context: fork |
Run the skill in an isolated subagent with its own context window. |
agent |
Which subagent type to use when forking (Explore, Plan, etc.). |
hooks |
Lifecycle hooks scoped to this skill. |
paths |
Glob patterns โ skill only auto-activates for matching files. |
argument-hint |
Shown in autocomplete, e.g. [issue-number]. |
๐ How Progressive Disclosure Works (Why Skills Stay Cheap)
The thing that makes Skills scale is progressive disclosure. In a normal Claude Code session, only the descriptions of your skills sit in context. The full SKILL.md body only loads when the skill is actually invoked โ either by you typing /name or by Claude deciding the description matches your request.
This is why you can have 50 skills installed without drowning the context window. A 40-line description index costs almost nothing. A 500-line procedure only enters context when you need it.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Session context โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โข CLAUDE.md (always loaded) โ
โ โข skill descriptions (1,536 chars each, capped) โ
โ โข conversation โ
โ โข [full skill body] โโโ loads only when invoked โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Two knobs change this behavior:
disable-model-invocation: trueremoves the skill's description from context entirely. You can still run/namemanually, but Claude won't auto-pick it.- Subagents with preloaded skills inject the full skill body at startup instead of deferring โ useful for specialized agents.
โก Skills 2.0: Hooks, Subagents, Shell Injection, Tool Restrictions
The April 2026 updates collectively called "Skills 2.0" turned Skills from a nicer prompt wrapper into a legitimate programming primitive. Four features matter most.
1. Subagent forking with context: fork
Add context: fork and your skill runs in an isolated subagent with its own context window. The skill body becomes the subagent's prompt. Useful for research tasks that would otherwise pollute your main conversation.
---
name: deep-research
description: Research a topic thoroughly without cluttering the main conversation.
context: fork
agent: Explore
---
Research $ARGUMENTS thoroughly:
1. Find relevant files using Glob and Grep.
2. Read and analyze the code.
3. Summarize findings with specific file references.
Running /deep-research authentication flow spins up a fresh Explore agent, runs the task in isolation, and returns a summary to your main session. Your context stays clean.
2. Shell injection with !`command`
You can run shell commands before Claude sees the skill content. Output replaces the placeholder, so Claude receives real data rather than an instruction to go fetch it.
---
name: pr-summary
description: Summarize the current pull request.
context: fork
agent: Explore
allowed-tools: Bash(gh *)
---
## Pull request context
- PR diff: !`gh pr diff`
- PR comments: !`gh pr view --comments`
- Changed files: !`gh pr diff --name-only`
## Your task
Summarize this pull request in three bullets...
The three !`gh ...` commands execute first. Claude never sees the command โ it sees the output. This is preprocessing, not tool use.
3. Tool restrictions with allowed-tools
allowed-tools pre-approves specific tools so Claude doesn't stop to ask permission each time the skill runs. Combined with disable-model-invocation: true, this is how you build safe-ish automation primitives.
---
name: commit
description: Stage and commit current changes.
disable-model-invocation: true
allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *)
---
Stage and commit:
1. `git status` to see what changed.
2. Group related changes.
3. Write a commit message following our style.
4. Commit and confirm.
4. Lifecycle hooks with hooks
Skills can hook into session events to enforce behavior deterministically rather than hoping the model complies. This is how teams are wiring skills to always run linters, validate specs, or block risky tool calls.
---
name: api-conventions
description: Enforce this codebase's API design rules.
hooks:
PreToolUse:
- command: "./scripts/validate-endpoint.sh"
---
When writing API endpoints:
- Use RESTful naming.
- Return consistent error formats.
- Include request validation.
description fits on one line โ this is the most common Skills 2.0 footgun.
๐ Skills vs MCP vs Tools vs Subagents: The Comparison
This is the table most developers wish existed. All four primitives are Anthropic-native, they look superficially similar, and picking the wrong one wastes hours.
| Dimension | Skill | MCP Server | Tool Call | Subagent |
|---|---|---|---|---|
| What it is | Markdown procedure Claude follows | External service Claude connects to | Direct function invocation | Isolated agent with its own context |
| What it provides | Instructions ("how to do X") | Data + actions ("read/write X") | A single capability (file, bash, web) | A fresh reasoning context |
| Analogy | A playbook | A network adapter | A hammer | A coworker |
| Runs where | Inside your session | Out-of-process server | Inside your session | Forked context |
| Loads into context | Only when invoked (progressive disclosure) | Tool descriptions persist | Always available | Prompt only |
| Can fetch external data? | โ No (unless it calls a tool/MCP) | โ Yes | โ Yes, if it's a data tool | โ Via its own tools |
| Best for | Repeatable procedures, style guides, playbooks | Connecting to GitHub, Jira, DBs, browsers | One-shot operations inside the model's native tools | Long research, parallel work, context isolation |
| Install complexity | Drop a folder | Run a server, configure config | Built-in | Drop a file |
| Token cost when idle | ~1,500 chars (description only) | Tool descriptions stay in context | Near zero | Near zero until invoked |
| Example | /commit, /explain-code, /deploy |
github-mcp, postgres-mcp, playwright-mcp |
Bash, Read, WebFetch |
Explore, Plan, custom agents |
The sentence that makes this click: MCP hands Claude a hammer. A Skill explains how to use the hammer to drive nails. If you find yourself writing a Skill that needs to fetch real data, you pair it with an MCP server. They're complementary, not competing.
For a deeper MCP primer, see the MCP Servers Explained guide, and if you want to build your own MCP, the Build a Custom MCP Server tutorial walks through Python and TypeScript implementations end-to-end.
๐ช Where to Find Skills: The Marketplace Landscape
Three ecosystems matter as of April 2026. Most people use all three without realizing they're separate.
1. Anthropic's official skills
Ship inside Claude Code and the claude.com app. Currently includes:
- Document generation: Excel (
.xlsx), PowerPoint (.pptx), Word (.docx), fillable PDFs - Bundled Claude Code skills:
/simplify,/batch,/debug,/loop,/claude-api,/init,/review,/security-review - Custom Skills API for Team and Enterprise
These are available to Pro, Max, Team, and Enterprise plans. No install step โ they're already on your system.
2. Community repositories
| Repo | Stars | What it is |
|---|---|---|
๐ฅ forrestchang/andrej-karpathy-skills |
62,900+ | Karpathy's distilled CLAUDE.md patterns packaged as skills |
๐ฅ thedotmack/claude-mem |
63,600+ | Session-memory skill that auto-captures what Claude does |
๐ฅ addyosmani/agent-skills |
18,100+ | 20 production-grade skills across Define/Plan/Build/Verify/Review/Ship phases |
vercel-labs/skills |
N/A | Vercel's starter collection behind skills.sh |
muratcankoylan/Agent-Skills-for-Context-Engineering |
N/A | Context-engineering patterns for multi-agent systems |
addyosmani/agent-skills is the one most teams converge on โ each skill has an anti-rationalization table, red flags, verification steps, and a progressive-disclosure layout. Latest release is 0.5.0 (April 10, 2026), MIT licensed.
3. Vercel's skills.sh directory
Launched January 20, 2026 as the open directory and leaderboard for agent skill packages. Works across 19 agents โ not just Claude Code, but also Cursor, Codex, Copilot, Windsurf, Gemini CLI, and others.
npx skills add vercel-labs/agent-skills
The leaderboard is public and updated in real time based on install telemetry. As of March 2026, find-skills crossed 579,000 installs and vercel-react-best-practices passed 216,000.
skills.sh and addyosmani/agent-skills for your use case. "Commit with style," "PR review checklist," and "write a spec" are already solved problems with battle-tested versions available.
๐งญ A Decision Framework: Skill, MCP, or Tool Call?
Use this order every time. It's a five-second check that saves you an hour.
- Does Claude already have a built-in tool for this? (Read, Bash, WebFetch, Grep, Edit.) If yes โ just call it. Don't wrap it in anything.
- Do you need to connect to an external system (GitHub, a DB, your CRM, a browser)? You need an MCP server. Install one, or write one.
- Are you repeating the same procedure more than twice? Write a Skill. The threshold really is twice โ below that, just type it out.
- Does the procedure need live external data? Pair a Skill with an MCP connector. The Skill is the playbook, the MCP is the data source.
- Does the task need its own context window (long research, parallel work, isolation from the main conversation)? Use a Subagent โ either via
context: forkin a skill or a dedicated.claude/agents/file.
Three common wrong turns:
- Writing a Skill when you needed an MCP. A Skill can't fetch your GitHub issues on its own. If your instructions read "first, go look up X in Y system," you need an MCP.
- Writing an MCP when you needed a Skill. If your instructions are purely procedural ("always run tests before committing, always write the message like this"), that's a Skill.
- Putting the whole playbook in
CLAUDE.md.CLAUDE.mdstays in context every turn. A 400-line procedure there costs you tokens on every single message. Move it to a Skill and recover the context.
For more on the CLAUDE.md side, the CLAUDE.md Project Instructions Standard guide covers what belongs there versus in a Skill.
๐ ๏ธ Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
Skill doesn't appear in / menu |
user-invocable: false is set, or description wrapped across multiple YAML lines |
Single-line description; drop user-invocable: false unless background-only |
| Claude never auto-invokes the skill | Description lacks the trigger phrases users actually say | Front-load user-visible keywords in description; add when_to_use |
| Skill triggers too often | Description is too generic | Tighten with specific keywords; add disable-model-invocation: true if it's an action |
| Descriptions appear truncated | Combined description + when_to_use exceeds 1,536 chars or total budget is full |
Trim, or raise SLASH_COMMAND_TOOL_CHAR_BUDGET |
| Skill seems ignored mid-conversation | Auto-compaction dropped older skill contents | Re-invoke the skill after compaction |
Shell injection !`cmd` doesn't run |
disableSkillShellExecution is enabled, or command lacks permission |
Check settings; list the command under allowed-tools |
context: fork skill returns nothing |
Skill body is guidelines only, no task | Add an explicit task for the subagent to perform |
๐ฐ Cost and Availability
Skills themselves cost nothing โ they're just Markdown files. The cost is token usage during invocation, which is almost always cheaper than stuffing the same content into CLAUDE.md.
| Plan | Access to official Skills | Custom Skills API |
|---|---|---|
| ๐ Claude Code (local) | โ Bundled skills | โ Personal + project skills |
| Pro | โ Official skills | โ ๏ธ Personal skills only |
| Max | โ Official skills | โ Full |
| Team | โ Official skills | โ Full + shared team skills |
| Enterprise | โ Official skills | โ Full + managed deployment |
The Agent Skills standard itself is open โ Anthropic published the spec at agentskills.io and tools from Cursor to Vercel to Microsoft's .NET team now consume the same SKILL.md format. Skills you write for Claude will increasingly work unchanged in other agents.
๐ What's Next
- ๐ง Convert three of your
CLAUDE.mdprocedures into Skills. You'll recover context budget immediately. Good candidates: commit style, PR template, deployment steps. - ๐ Pair your next Skill with an MCP server. Pick one fetchable data source (GitHub issues, Postgres, your analytics) and wire them together.
- ๐ฆ Install
addyosmani/agent-skillsas a starting library. Faster than writing from scratch, and the patterns are worth studying. - ๐งช Use
context: forkfor your next research task. The context-isolation win is underrated until you try it. - ๐ท๏ธ Browse
skills.shbefore writing anything. Your problem is probably solved. - ๐ Read the Cursor IDE Tips and Tricks guide. Cursor skills consume the same standard โ most patterns transfer directly.
For the rest of the Claude Code stack, see the Claude Code Workflow Guide and the MCP Servers Explained primer โ Skills, MCP, and CLAUDE.md work best when you understand all three as one system.