Back to Blog

Claude Code skills vs subagents vs plugins vs MCP servers: what to use when

Skills, subagents, plugins and MCP servers solve four different problems in Claude Code. Here is where each one lives, what loads it, and how to choose.

Theo Marsh11 min read

Checked against Claude Code 2.1.281 on

The four are not four ways to do the same thing, which is why "skills vs subagents" is the wrong question to start from. A skill is instructions Claude follows in your current conversation, a subagent is a separate context window that does side work and hands back a summary, an MCP server is a connection to a system outside Claude, and a plugin is the box you put the other three in so somebody else can install them. Pick by the problem: repeated instructions become a skill, context pollution becomes a subagent, an external system becomes an MCP server, and sharing any of them becomes a plugin.

Everything below was checked against the Claude Code documentation, with commands confirmed against Claude Code 2.1.281. The skills, subagents and MCP pages were checked on 24 September 2026; Anthropic reorganised the plugin documentation on 25 September, so every plugin claim here was re-checked against the pages that carry it on 26 September 2026.

#Which one solves which problem?

MechanismWhat it is forWhere it livesWhat loads itChoose it when
SkillA procedure, checklist or reference Claude should follow.claude/skills/<skill-name>/SKILL.md (project), ~/.claude/skills/<skill-name>/SKILL.md (personal), <plugin>/skills/<skill-name>/SKILL.mdYou type /skill-name, or Claude loads it from its description when relevantYou keep pasting the same instructions into chat
SubagentSide work that should not land in your main context.claude/agents/ (project), ~/.claude/agents/ (all your projects)Claude delegates from your prompt, you @-mention it, or you start with --agent <name>The task produces logs or search output you will never reference again
MCP serverReading and acting on a system outside ClaudeConfig in ~/.claude.json (local and user scope) or .mcp.json at the project rootclaude mcp add, then the server connects at session startYou are copying data into chat from another tool
PluginPackaging skills, agents, hooks and MCP servers togetherA directory with .claude-plugin/plugin.json and skills/, agents/, hooks/, .mcp.json at its root/plugin install <name>@<marketplace>, or --plugin-dir while developingYou want teammates or the community to install the whole set

Read the last column first. Three of the four rows describe a different failure you are trying to fix, and the fourth is about distribution rather than behaviour.

#What exactly is a skill?

A skill is a directory containing a SKILL.md file: YAML frontmatter, then Markdown instructions. The documentation describes the case for one directly. Use a skill "when you keep pasting the same instructions, checklist, or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact."

The economics are the part people miss. As the docs put it, "Unlike CLAUDE.md content, a skill's body loads only when it's used, so long reference material costs almost nothing until you need it." CLAUDE.md is paid for on every turn. A skill is paid for when it fires.

Skills load from more places than most people realise:

LocationPath
Personal~/.claude/skills/<skill-name>/SKILL.md
Project.claude/skills/<skill-name>/SKILL.md
Nested<subdir>/.claude/skills/<skill-name>/SKILL.md
Plugin<plugin>/skills/<skill-name>/SKILL.md, invoked as /plugin-name:skill-name
Additional directory.claude/skills/<skill-name>/SKILL.md in a directory passed with --add-dir
Enterprise.claude/skills/<skill-name>/SKILL.md in the managed settings directory

Two invocation routes are on by default. You can type /skill-name, and Claude can load the skill on its own based on the description in the frontmatter. Each can be switched off: disable-model-invocation: true leaves only you able to invoke it, and user-invocable: false leaves only Claude.

For writing one, our guide to Claude Code skills and custom slash commands covers the authoring side in detail, and the Agent Skills hub tracks the cross-tool format.

Want step-by-step guides for this and more?

ClawDocx Pro includes 500+ curated prompts, setup guides, SKILL.md files, and templates — everything to make your AI agent unstoppable.

See plans & pricing

#What exactly is a subagent?

A subagent is a Markdown file with frontmatter that defines a specialist: name, description, and optionally tools, model, permissionMode, skills, memory and more. The documentation's framing of when to reach for one is precise about the benefit:

Use one when a side task would flood your main conversation with search results, logs, or file contents you won't reference again: the subagent does that work in its own context and returns only the summary.

That separation is the whole point: "Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions."

A minimal definition is short:

markdown
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.

There are three ways to reach it, escalating in how strongly you commit: name it in your prompt and let Claude decide whether to delegate, @-mention it directly, or make it the session default with claude --agent code-reviewer.

Our subagents guide goes further into built-in agents and routing work to cheaper models.

#How do you decide between a skill and a subagent?

Ask what you are trying to protect. A skill protects you from repeating yourself. A subagent protects your context window.

That gives a usable test. If the work produces output you want to read and build on in this conversation, a skill keeps it where you can see it. If the work produces output you want the conclusion of and nothing else, a subagent keeps the raw material out of your way.

The line is softer than it looks, and it is worth knowing why before you argue about it. A SKILL.md can set context: fork to run in a forked subagent context, and agent to choose which subagent type handles it. A related field, background, only applies with context: fork and can be set to false to wait for the forked subagent's result. So a skill that has grown expensive can be moved behind a context boundary without being rewritten as a subagent.

The two also compose in the other direction: a subagent's frontmatter takes a skills field that preloads skills into its context. A skill is not a small subagent and a subagent is not a big skill. One is instructions, the other is an execution boundary, and a mature setup usually has both.

#When is an MCP server the right answer?

When the gap is access rather than instruction. MCP is an open standard for connecting Claude to external tools and data sources, and the documentation's trigger for using one is behavioural:

Connect a server when you find yourself copying data into chat from another tool, like an issue tracker or a monitoring dashboard. Once connected, Claude can read and act on that system directly instead of working from what you paste.

No skill can close that gap on its own. A skill can tell Claude how to interpret your Jira tickets beautifully and still have no way to read one.

Servers are added from the command line, and the scope decides who gets them:

bash
claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --transport http shared-server --scope project https://example.com/mcp
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable -- npx -y airtable-mcp-server
ScopeLoads inSharedStored in
Local (default)Current project onlyNo~/.claude.json
ProjectCurrent project onlyYes, through version control.mcp.json at the project root
UserAll your projectsNo~/.claude.json

Project scope is the one to reach for on a team, because .mcp.json is a checked-in file. HTTP is the recommended transport for remote servers, stdio runs a local process, SSE is documented as deprecated but supported, and WebSocket is configured through claude mcp add-json rather than a --transport flag.

The MCP hub tracks the protocol itself.

#Where do plugins fit in?

A plugin is not a fifth kind of capability. It is a directory that holds the other kinds, with a manifest at .claude-plugin/plugin.json:

Directory at the plugin rootWhat goes in it
skills/Skills as <name>/SKILL.md directories
agents/Custom agent definitions
hooks/Hooks, declared in hooks/hooks.json
.mcp.jsonMCP server configurations
.lsp.jsonLanguage server declarations, for diagnostics and code navigation
monitors/Background monitors, declared in monitors/monitors.json
commands/Skills as flat Markdown files. The docs say to use skills/ for new plugins

One placement rule is worth naming, because getting it wrong fails silently. The documentation puts it plainly: "Only plugin.json goes inside .claude-plugin/. Components saved there don't load." So skills/, agents/, hooks/ and the rest go at the plugin root, beside that folder rather than inside it.

The documentation frames the decision as standalone configuration versus a plugin rather than as plugin versus skill, and it draws the line by audience rather than by capability:

Skills, agents, hooks, and MCP servers all work standalone in your project or home directory. Keep that standalone setup while it serves one project or only you. Make a plugin when you want to share the setup with teammates, install it in several projects, or publish versioned releases.

Take that literally. Nothing you can do in a plugin is unavailable standalone, so the reason to package is distribution, not power. The visible difference is naming: a standalone skill is /hello, and the same skill inside a plugin is /plugin-name:hello. Building the plugin first buys you namespacing and a manifest you do not need yet.

Installing one from Anthropic's official marketplace is a single command, because Claude Code registers that marketplace for you the first time you start an interactive session. Any other marketplace has to be added first, with /plugin marketplace add:

shell
/plugin install commit-commands@claude-plugins-official

While you are developing, claude --plugin-dir ./my-plugin loads a plugin without installing it at all.

One caution belongs here rather than at the end, because a plugin is the one mechanism of the four that ships somebody else's executable code. Claude Code's plugin security page is direct about it:

A Claude Code plugin you install can execute arbitrary code on your machine with your user privileges.

The same page is specific about how: hooks "execute shell commands with your full user permissions", and "Claude Code runs hooks and MCP servers outside the sandbox". It also warns that Anthropic "cannot verify that they will work as intended or that they won't change", so a plugin you audited can change under you. Nothing on ClawDocx endorses any third-party plugin or skill. Before installing somebody else's bundle, work through our skill security audit checklist.

#A worked decision

Say you want Claude Code to review pull requests against your team's standards.

  1. The standards themselves are a skill. They are a procedure you would otherwise paste. Put them in .claude/skills/pr-review/SKILL.md and commit them.
  2. Reading the pull request needs an MCP server. Claude cannot see GitHub without one. Add it at project scope so the whole team gets it from .mcp.json.
  3. If the review floods your context, it becomes a subagent. Diffs, CI logs and file contents are exactly the material the subagent documentation describes keeping out of the main conversation. Define .claude/agents/pr-reviewer.md with only the tools it needs.
  4. When another team asks for it, it becomes a plugin. Move the skill into skills/, the agent into agents/, the server config into .mcp.json, add a manifest, and publish it through a marketplace.

Each step is triggered by a problem that appeared, not by a decision made up front. That ordering is the practical answer to "what should I use", and the Claude Code hub tracks the features as they change.

#What this comparison does not settle

Two things are genuinely open rather than simply unwritten here.

The first is what happens when the same name exists twice, standalone and inside a plugin. For skills the answer is visible in the name: a plugin skill is namespaced as /plugin-name:skill-name, so a standalone /skill-name and a plugin copy coexist rather than one shadowing the other. For agents we could not establish the rule from the pages we checked, so we are not stating one. If you are migrating a standalone setup into a plugin, check the behaviour you get rather than assuming it matches the skill case.

The second is cost. The /plugin interface shows a context cost estimate for a plugin before you install it, and /plugin lists plugins you have not used recently, but neither gives you a per-skill budget across a whole configuration. If you are running many skills at once, measure rather than assume.

Frequently asked questions

What is the difference between a skill and a subagent in Claude Code?
A skill adds instructions to the conversation you are already in, so its output and its reasoning stay in your context. A subagent runs in its own context window with its own system prompt and tool access, and returns only a summary. Choose a skill to tell Claude how to do something, and a subagent to keep the work from filling your main conversation.
Is a plugin an alternative to skills and subagents?
No. A plugin is a packaging format that can contain skills, agents, hooks, MCP servers, LSP servers and background monitors. Claude Code's documentation frames the choice as standalone configuration in .claude/ versus a plugin, where the plugin exists for sharing, versioned releases and reuse across projects.
When should I use an MCP server instead of a skill?
Use an MCP server when Claude needs to reach a system it cannot otherwise read or act on, such as an issue tracker or a database. The Claude Code docs suggest connecting a server when you find yourself copying data into chat from another tool. A skill cannot fetch anything by itself; it is instructions.
Can a skill run in its own context window like a subagent?
Yes. A SKILL.md can set context: fork to run in a forked subagent context, and agent to choose which subagent type to use. That makes the skill and subagent distinction a setting rather than a wall, though the default for a skill is still to run in your current context.
Where do skills and subagents live on disk?
Skills live in directories named after the skill, as .claude/skills/<skill-name>/SKILL.md for a project or ~/.claude/skills/<skill-name>/SKILL.md for you personally, plus plugin, enterprise, nested and --add-dir locations. Subagents are single Markdown files in .claude/agents/ for a project or ~/.claude/agents/ for all your projects.

Sources

  1. Skills (Claude Code docs)
  2. Subagents (Claude Code docs)
  3. Create a Claude Code plugin (Claude Code docs)
  4. Add components to a plugin (Claude Code docs)
  5. Connect to tools with MCP (Claude Code docs)
  6. Install and manage plugins (Claude Code docs)
  7. Plugin security and trust (Claude Code docs)

Get the full experience with ClawDocx Pro

Access 500+ prompts, step-by-step guides, SKILL.md files, and more. Everything you need to master OpenClaw.

Start Free Trial

Related Posts