Claude Code Skills vs Hooks vs Subagents vs MCP

A skill is a reusable procedure the model loads on demand when a task looks relevant, so following it is the model's choice. A hook is a shell command wired to a lifecycle event that runs deterministically every time its event matches, whether or not the model would have chosen to. Use skills for know-how and hooks for rules that must never be skipped.
Use a subagent when a task will generate far more tokens than the conclusion is worth keeping, such as reading many files or running an adversarial review. The subagent works in its own context window and returns only a summary, keeping bulky work out of the main session. A skill, by contrast, runs inside the current context and is about following a procedure, not isolating one.
MCP connects the model to external tools, data sources, and services through a standard protocol, so it can reach systems outside the local repository. Skills, hooks, and subagents all operate within your project and machine, while MCP is the bridge to the outside. If a task needs data or actions from an external system, MCP is the mechanism for it.
Yes, and mature setups layer them deliberately. A hook can enforce a quality gate, a skill can describe a workflow, a subagent can run heavy research in isolation, and an MCP server can supply external data, all in the same project. They are not competing features but four tools for four different jobs.
Start from intent. Write a skill for a repeatable procedure, a hook for something that must happen every time without exception, a subagent for work that floods the context or needs a fresh perspective, and an MCP server for data or actions from outside the repository. Matching the mechanism to the intent avoids wasted effort.

Key Takeaway
Claude Code offers four extension mechanisms that people constantly confuse. Skills are on-demand procedures the model loads when relevant, hooks are deterministic scripts that fire on events, subagents are isolated helpers with their own context, and MCP connects external tools and data. Each solves a different problem, and the trick is matching mechanism to intent.
If you have spent any time steering Claude Code, you have met skills, hooks, subagents, and MCP servers. They overlap enough to be confusing and differ enough that using the wrong one quietly wastes effort. This guide draws the line between them so you can reach for the right mechanism on the first try.
The short version is that they answer four different questions. Skills answer how should I do this task; hooks answer what must always happen; subagents answer who should handle this in isolation; and MCP answers where the data and tooling come from. Keep those questions in mind and the decision usually makes itself.
| Mechanism | What it is | When it runs | Best for |
|---|---|---|---|
| Skills | Reusable instructions and scripts the model loads on demand | Model decides, based on task relevance | Encoding a repeatable procedure or house style |
| Hooks | Shell commands wired to lifecycle events | Deterministically, on a matching event | Guardrails like formatting, linting, or blocking edits |
| Subagents | A separate assistant with its own context and tools | When the main session delegates a task | Isolating noisy research or adversarial review |
| MCP | A protocol connecting external tools, data, and services | When the model calls a connected tool | Reaching systems outside the local repo |
A skill packages a chunk of know-how into a folder that Claude discovers and loads only when a task looks relevant. Instead of pasting the same setup steps or coding conventions into every prompt, you write them once as a skill and let the model pull them in when needed. This keeps the base context lean while the procedure stays one trigger away.
Skills shine when the knowledge is reusable but not always needed. Good candidates share a few traits:
A hook is a shell command that fires automatically on a lifecycle event, such as before a tool runs or after a file is edited. Unlike a skill, a hook is not a suggestion the model may or may not follow; it runs every time its event matches, which makes it the right tool for rules that must never be skipped.
Use hooks to format code on save, run a linter before a commit, block edits to protected paths, or log every command for later audit. Because they are deterministic, they turn fuzzy instructions like please always run the formatter into a guarantee the model cannot forget.
When you catch yourself writing always or never in a prompt, that is usually a hook, not a skill. Prompts persuade; hooks enforce. Move hard rules into a hook and free the model to focus on judgment calls instead.
The last two mechanisms extend Claude beyond the current chat. Subagents extend it inward into parallel contexts, while MCP extends it outward into external systems.
Do not reach for MCP when a local script would do. Every connected server adds tool definitions to the context and a new surface to secure. If a plain command or a skill can accomplish the task inside the repo, that is almost always the cheaper and safer choice.
Start from intent. If you want the model to follow a repeatable procedure, write a skill. If you want something to happen every time without exception, write a hook. If a task will flood the context or benefits from a fresh perspective, delegate to a subagent. If you need data or actions from outside the repository, connect an MCP server.
These are not mutually exclusive, and mature setups layer them. A hook can enforce a gate, a skill can describe the workflow, a subagent can run the heavy lifting, and an MCP server can supply the external data all in the same project. The skill is knowing which job each one is actually doing.
Skills, hooks, subagents, and MCP are not competing features but four answers to four different questions. Match the mechanism to the intent, layer them deliberately, and Claude Code stops feeling like a black box and starts behaving like a system you designed on purpose.