Skills vs subagents vs commands vs MCP vs plugins in Claude Code
Five primitives, one decision table. When to reach for a skill, a subagent, a slash command, an MCP server, or a plugin — and the mistakes that waste your context window.
Claude Code gives you five ways to customize it — skills, subagents, slash commands, MCP servers, and plugins — and their overlap is the single most confusing thing about the tool. Here is the short version: use a slash command to fire a prompt you type on demand, a skill for knowledge Claude loads on its own when it's relevant, a subagent when you need work done in a separate context window, an MCP server to give Claude live access to an external system, and a plugin to ship any of the above to your team as one installable bundle.
The rest of this guide is the decision table, then one section per primitive with the real trade-off — context cost — that most explainers skip.
The decision table
| Primitive | Who triggers it | Runs in | Reach for it when |
|---|---|---|---|
| Slash command | You (typed) | Main context | You repeat the same prompt |
| Skill | Claude (auto) | Main context | Claude needs reusable know-how |
| Subagent | Claude or you | A fresh context | Work should not pollute your main thread |
| MCP server | Claude (as a tool) | External process | Claude needs live external data/actions |
| Plugin | Install-time | n/a — a bundle | You want to distribute all of the above |
Slash commands: a prompt you keep
A slash command is a Markdown file in .claude/commands/ whose body is a prompt. You invoke it by name, and $ARGUMENTS is replaced with whatever you type after it. It runs in your main context window — so it sees your conversation and adds to it.
---
description: Review the current diff for security issues
---
Review the staged diff for injection, authz, and secret-handling bugs: $ARGUMENTSReach for a command when you want to trigger something deterministically. If you find yourself pasting the same instruction repeatedly, it's a command.
Skills: know-how Claude loads itself
A skill is a SKILL.md file (in its own folder) with a trigger-rich description. Claude reads only the descriptions until one matches the task, then pulls the full skill into context. The description field is doing the routing — a vague description means the skill never fires.
description is what decides whether it activates. Name the concrete situations, file types, and phrasings that should trigger it — not what it is, but *when to use it*.Reach for a skill when the knowledge should apply automatically whenever it's relevant, without you remembering to invoke it.
Subagents: a separate context window
A subagent is a specialized assistant with its own system prompt, its own tools, and — critically — its own context window. When Claude delegates to a subagent, that work happens off to the side and only the result comes back. That isolation is the whole point: a long, noisy task (a big refactor, a test run, a security sweep) doesn't fill up your main thread.
The cost is real, though: a subagent doesn't automatically share your main conversation or, in some cases, your project's full context — so it can repeat work or miss detail. Reach for a subagent when the isolation is worth more than the shared context.
MCP servers: live access to the outside
An MCP (Model Context Protocol) server exposes an external system — a database, an issue tracker, a browser — to Claude as a set of tools. Reach for MCP when Claude needs to read or act on something outside your codebase in real time.
Plugins: the distribution layer
A plugin is a packaged bundle — it can contain commands, skills, subagents, hooks, and MCP configuration together — that someone installs from a marketplace with one step. Plugins aren't a *sixth* kind of capability; they're how you ship the other five to a team so everyone gets the same setup.
A 30-second decision path
- Do you want to trigger it by typing? → slash command.
- Should Claude apply it automatically when relevant? → skill.
- Does the work need its own context window (long, noisy, or parallel)? → subagent.
- Does Claude need live access to an external system? → MCP server.
- Do you want to give all of the above to your team in one install? → plugin.
The mistake to avoid
The failure mode isn't picking the wrong primitive — it's installing too many of everything. Experienced users converge on a small set that earns its place and delete the rest. Agent and skill descriptions do load so Claude can route to them, and near-duplicates make every routing decision harder — so the win comes from removing overlap, not from hoarding capability. A lean .claude/ beats a crowded one.