Claude Code Skills vs Subagents vs Slash Commands vs MCP: What Each Does and When to Use Each
Claude Code gives you four ways to extend it: skills, subagents, slash commands, and MCP servers. They overlap just enough to be confusing — all four "add capabilities", all four live in config files, and every tutorial explains one of them in isolation. This guide explains all four side by side, so you know exactly which one to reach for.
The one-paragraph version
Slash commands are prompts you trigger manually. Skills are instructions Claude pulls in automatically when a task matches. Subagents are separate Claude instances with their own context window that the main session delegates work to. MCP servers connect Claude to external systems — databases, APIs, browsers, SaaS tools. Everything else is detail.
Slash commands: reusable prompts you invoke by name
A custom slash command is a markdown file in .claude/commands/. The filename becomes the command: review.md gives you /review. The file body is the prompt that runs when you type it, and $ARGUMENTS interpolates whatever you type after the command name.
The defining property is that you decide when it runs. Claude never triggers a slash command on its own. That makes commands the right tool for workflows you repeat deliberately: kicking off a code review, drafting a changelog, generating a commit message, scaffolding a component. If you find yourself typing the same three-paragraph prompt every week, that prompt should be a slash command.
Skills: knowledge Claude loads when it decides it needs it
A skill is a folder containing a SKILL.md file (plus optional scripts and reference docs) in .claude/skills/. The frontmatter has a description field, and that field is the trigger: Claude scans skill descriptions at the start of a task, and when your request matches one, it loads the full skill into context and follows it.
The defining property is automatic, model-decided activation. You never type a skill name. You say "audit this site for SEO problems" and the SEO-audit skill fires because its description matched. Skills are the right tool for expertise you want applied consistently without remembering to ask: how your team writes migrations, how to process PDFs, what a proper security review covers. They also support progressive disclosure — Claude reads only the description until the skill is needed, so a large skill library costs almost nothing in context.
The catch: badly written descriptions mean skills that never fire. That problem is common enough that we wrote a whole guide on it and a free SKILL.md validator.
Subagents: delegation with a fresh context window
A subagent is a markdown file in .claude/agents/ defining a name, a description, a system prompt, and optionally a restricted tool list and model. When the main Claude session hits a task matching a subagent's description — or when you ask it to delegate — it spins up that subagent as a separate Claude instance with its own clean context window, waits for it to finish, and gets back only the result.
Two properties make subagents different from everything else on this list:
- Context isolation. A subagent can read forty files while researching a question, and none of those forty files land in your main conversation — just the answer. This is how long sessions stay coherent.
- Scoped permissions. A code-reviewer subagent can be given read-only tools. A test-runner can run commands but not edit files. The main session keeps full access while delegated work runs with less.
Use subagents for work that is voluminous (research, codebase exploration), specialized (security review, database migrations), or parallelizable (several independent tasks at once). Don't use them for small edits — the handoff overhead beats the benefit.
MCP: the plug for external systems
The Model Context Protocol is an open standard for connecting AI tools to outside systems. An MCP server exposes tools — "query Postgres", "search Slack", "create a Linear issue" — and Claude Code can call them like built-in tools. Skills, commands, and subagents change how Claude thinks; MCP changes what Claude can touch. If the capability you want requires data or actions outside your repo, it's MCP. If it requires knowledge or process, it's one of the other three.
The decision table
- "I run this workflow on demand" → slash command
- "Claude should just know how we do X" → skill
- "This deserves a specialist with its own context (or restricted permissions)" → subagent
- "Claude needs to reach a system outside this repo" → MCP server
- "Always, for everything in this project" → that's not an extension at all; put it in CLAUDE.md
How they combine
The primitives are designed to stack. A /deploy-check slash command can invoke a subagent; that subagent can have a skill loaded that documents your deployment process; the skill can instruct it to check your monitoring dashboard through an MCP server. Mature Claude Code setups aren't "skills people" or "agents people" — they use commands as entry points, skills as knowledge, subagents as workers, and MCP as wiring.
And plugins, if you've seen that term: a plugin is simply a distributable bundle that can contain all four, installed as a unit.
Skip the assembly: ClaudeThings kits ship 89 subagents, 103 skills, and 181 slash commands — pre-built, pre-tuned, and installed into Claude Code with one command. See what's inside →
FAQ
Can a skill and a slash command do the same thing? +
Do subagents cost more tokens? +
Where do these files live — project or user level? +
.claude/ in the repo) is shared with your team via git; user-level (~/.claude/) follows you across projects. Project-level wins when both define the same name.Keep reading
The 12 Claude Code Subagents Worth Setting Up First
A curated starter set of agents, with the reasoning behind each pick.
Read →How to Write a SKILL.md That Actually Triggers
Why most skills never fire, and how to fix the description field.
Read →Getting Started with Claude Code
From install to first shipped feature — setup, CLAUDE.md, and workflow habits.
Read →