Claude Code skills vs hooks vs subagents vs MCP
Claude Code has more extension points than most people use. The mistake is adding all of them on day one. Each one solves a specific problem, and each costs context. Here is how to tell them apart, based on the official feature overview.
The map#
Each one in a sentence#
| Feature | What it does | Reach for it when |
|---|---|---|
| CLAUDE.md | Persistent instructions, every session | Claude gets a convention wrong twice (guide) |
| Skill | Reusable knowledge or a /command workflow | You paste the same playbook for the third time |
| Subagent | An isolated worker returning a summary | A side task would flood your conversation with output |
| Hook | A script or action on an event | Something must happen every time without asking |
| MCP | Connection to an external system | You keep copying data from a tab Claude cannot see |
| Plugin | A bundle of the above | A second repo needs the same setup |
Skills vs CLAUDE.md#
Both hold instructions. The difference is when they load. CLAUDE.md is in every request, so keep it under about 200 lines of rules that always apply. A skill's description sits in context and its full content loads only when used, so it suits long reference material (an API style guide) or a workflow you trigger with a slash command (/deploy, /release).
Rule of thumb: if Claude should always know it, CLAUDE.md. If it needs it sometimes, a skill.
Hooks vs skills: guarantee vs guidance#
A skill is read and interpreted by the model, so the outcome can vary. A hook is code that always fires on its event.
"Never edit
.env" in CLAUDE.md is a request. APreToolUsehook that blocks the edit is enforcement.
Good hook jobs: run ESLint or a formatter after every file edit, block unsafe commands, log activity, send a notification when a session ends. Their output only enters the conversation if the hook returns something.
Subagents: keep your main context clean#
A subagent runs its own loop in a fresh context. It might read dozens of files, but your main conversation only receives the summary. Reach for one when:
- the task reads a lot but you only need the conclusion,
- tasks can run in parallel,
- you want a specialized worker with its own instructions.
For jobs that outgrow a few subagents, Claude Code also supports dynamic workflows that run many in the background.
MCP and skills work well together#
MCP gives Claude the connection (a database, Slack, a browser). A skill gives it the know-how (your schema, your query patterns, your message format). Add the connection with claude mcp add (how to), then write a skill describing how your team uses it.
Add them in this order#
Watch the context bill#
Every feature uses some of the model's attention. CLAUDE.md and active output styles cost tokens on every request. Skills cost their descriptions. MCP costs tool names. Hooks cost nothing unless they print. Too much configuration makes Claude worse, not better. This is context engineering applied to your own workspace.
New here? Start with what Claude Code is and 10 habits that get better results. Official overview: Extend Claude Code.
Frequently asked questions
What is the difference between a Claude Code skill and CLAUDE.md?
CLAUDE.md loads into every session automatically and holds always-do rules. A skill loads on demand, either when you type /
When should I use a hook instead of a skill?
Use a hook when something must happen the same way every time without Claude deciding, such as running a linter after every edit or blocking a dangerous command. Use a skill when Claude should reason about how to apply the steps.
What is a Claude Code subagent?
A worker with its own isolated context window. It can read many files and return only a summary, which keeps your main conversation clean.
What are Claude Code plugins?
Plugins package skills, hooks, subagents and MCP servers into one installable unit you can reuse across repositories or share through a marketplace.
Prefer plain text? Read this page as Markdown.