Short answers to what readers ask most about this topic.
01What is the difference between a Claude Code skill and a hook?
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.
02When should I use a subagent instead of a skill?
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.
03What does MCP do that skills, hooks, and subagents do not?
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.
04Can I use skills, hooks, subagents, and MCP together?
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.
05How do I decide which Claude Code mechanism to use?
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.
Skills, hooks, subagents, and MCP look similar but solve four different problems. Here is how to match each Claude Code mechanism to what you actually need.
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
Skills: procedures the model reaches for
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 well-defined procedure with clear steps, such as cutting a release or generating a migration.
A house style or checklist you want applied consistently without repeating yourself.
Optional helper scripts the skill can run, so the model executes proven commands rather than improvising.
Hooks: deterministic guardrails
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.
Subagents and MCP: isolation and reach
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.
A subagent runs a task in its own context window and returns only a summary, so bulky file reads or an adversarial review never crowd your main conversation.
MCP is an open protocol that connects the model to external tools, data sources, and services through a standard interface, so the same server works across different clients.
The two compose well: a subagent can call MCP tools inside its isolated context, keeping both the noise and the external calls out of the main session.
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.
Choosing the right mechanism
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.