Claude Code skills vs agents vs commands vs plugins vs MCP
When to use a skill, a subagent, a slash command, a plugin, a hook, an MCP server or CLAUDE.md in Claude Code, with the file each one lives in, a decision guide and the mistakes people make.
Claude Code can be extended six ways, and they overlap enough that people pick the wrong one. This page gives each a one-line definition, the file it lives in, when to use it, and a decision table. The short version: a skill is a method, a subagent is a separate worker, a command is a shortcut you type, a plugin is a package, a hook is an automatic reaction, and an MCP server is a connection.
Try it on a real task: Academic Plotting is free for 25 runs a month.
#The table
| Extension | Lives in | Who triggers it | Use it for |
|---|---|---|---|
| Skill | .claude/skills/<name>/SKILL.md |
Claude, when the task matches; or you by /name |
A repeatable method with reference files and scripts |
| Slash command | .claude/commands/<name>.md |
You, by typing /name |
A prompt you run on demand (now handled as a skill) |
| Subagent | .claude/agents/<name>.md |
Claude delegates, or you ask | Work that needs its own context window, tools or model |
| Hook | settings.json or a plugin's hooks.json |
An event (before a tool, after edit) | Formatting, linting, guardrails that must always run |
| Plugin | A folder with .claude-plugin/plugin.json |
/plugin install |
Shipping skills, commands, agents, hooks and MCP servers together |
| MCP server | .mcp.json or claude mcp add |
Claude, through tools | Reaching GitHub, a browser, a database, a design file, SkillGild |
CLAUDE.md |
Project or home directory | Always loaded | Rules and context that apply to every conversation |
#Skills
A skill is a folder with SKILL.md: frontmatter with a name and a description, then instructions, with optional scripts/, references/ and assets/. Claude reads descriptions at startup and loads a skill's body only when a request matches, so a skill can be large without a context cost until it is used.
Use a skill when you are describing how to do something that recurs: produce a figure, review a pull request against a rubric, write a launch video from a repository, humanise a draft. Skills are portable: the same folder works in Codex, Cursor and Gemini CLI.
Write one with how to create a Claude skill. Find ones people already use on the Claude Code skills page.
#Slash commands
A command was a Markdown prompt in .claude/commands/ that ran when you typed /name. Recent Claude Code versions treat commands and skills as one thing: a skill can be invoked as /name, and a command file is loaded as a skill. If you have old command files they still work.
The remaining distinction is intent. Mark a skill disable-model-invocation: true when it should only run when a person asks, for example anything that deploys, sends or deletes. Leave it off when Claude should pick the skill up on its own.
#Subagents
A subagent is a Markdown file in .claude/agents/ with a name, a description, optional tools and model fields, and a system prompt. When Claude delegates to it, the subagent works in its own context window and returns a summary.
Use one when the work would flood the main conversation (reading a large codebase, running a long test matrix), when it needs a different tool set (read-only reviewer), or when a cheaper or stronger model suits the step. Do not use a subagent to hold a method; put the method in a skill and let any agent, main or sub, load it.
Skills and subagents combine: a skill can tell Claude to hand a step to a named subagent, and a subagent can have skills of its own.
#Hooks
A hook runs a shell command on an event: before or after a tool call, when a session starts, when Claude stops. Typical hooks format files after every edit, block edits to protected paths, or run tests before a commit.
Use a hook when something must happen every time regardless of what Claude decides. A skill asks; a hook enforces.
#Plugins
A plugin packages any of the above with a manifest so they install together from a marketplace: /plugin marketplace add owner/repo, then /plugin install name@marketplace. A plugin is a delivery mechanism, not a new kind of behaviour. If you only have one skill, a plugin adds ceremony; if you have a set with a command, an agent and an MCP server, a plugin is the right unit.
Details and the manifest format are in Claude Code plugins.
#MCP servers
The Model Context Protocol connects Claude to tools and data: GitHub, a browser, Postgres, Figma, Notion, Sentry. A server exposes tools Claude can call; it does not tell Claude how to do a job. That is what a skill is for, and the two are often paired: a skill describes a QA method and the Playwright MCP server supplies the browser.
SkillGild's hosted skills use this pairing. The SkillGild MCP server exposes search, run and session tools; a hosted skill's wrapper tells Claude how to use them, and protected steps run on the server. Community skills on SkillGild are plain folders and do not need the server at all. Agent skills vs MCP servers covers the difference in depth, and the best MCP servers for Claude Code lists the ones worth adding.
#CLAUDE.md
CLAUDE.md is memory: project conventions, commands, things Claude should always know. It is loaded into every conversation, so keep it short. Anything that only applies to some tasks belongs in a skill, where it costs nothing until it is used.
#Decision guide
- Does it apply to every conversation?
CLAUDE.md. - Must it run automatically on an event, no exceptions? A hook.
- Does it reach an external system? An MCP server (plus a skill that says how to use it well).
- Is it a method for a recurring job? A skill. Add
disable-model-invocation: trueif only a person should start it. - Does it need its own context, tools or model? A subagent, which can still load skills.
- Do you want to ship several of these together? A plugin.
#Common mistakes
- Putting a method in CLAUDE.md. It is loaded every time and crowds the context; make it a skill.
- Writing a subagent to hold instructions. The instructions belong in a skill; the subagent is for isolation.
- Using an MCP server for guidance. Tool descriptions are short by design. Pair the server with a skill.
- Making a plugin for one skill.
skillgild install <slug>or a copied folder is simpler for the person installing it. - A skill description that only says what it does. It also needs to say when: the words a user would type.
Frequently asked questions
What is the difference between a Claude skill and a subagent?
A skill is a method Claude loads when a task matches: instructions, references and scripts. A subagent is a separate worker with its own context window, tools and model. Put the method in a skill; use a subagent for isolation.
Are slash commands the same as skills in Claude Code?
In recent versions, yes: a skill can be invoked as /name and old command files in .claude/commands/ are loaded as skills. Set disable-model-invocation: true on a skill that only a person should start.
When should I use an MCP server instead of a skill?
When Claude needs to reach an external system: GitHub, a browser, a database, a design file. A server supplies tools; a skill supplies the method for using them well. The two are usually paired.
Should project rules go in CLAUDE.md or a skill?
Rules that apply to every conversation go in CLAUDE.md, which is always loaded. A method that only some tasks need belongs in a skill, where it costs no context until it is used.