Claude Code

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#

Context Claude readsCLAUDE.md: always loaded, everyrequestSkills: descriptions always, full textwhen usedMCP: tool names, schemas on demandSubagents: separate window, summaryreturnedAutomation that just runsHooks: fire on lifecycle eventsDeterministic: no model judgmentZero context unless they print outputUse for must-never and must-alwaysrulesvs

Each one in a sentence#

FeatureWhat it doesReach for it when
CLAUDE.mdPersistent instructions, every sessionClaude gets a convention wrong twice (guide)
SkillReusable knowledge or a /command workflowYou paste the same playbook for the third time
SubagentAn isolated worker returning a summaryA side task would flood your conversation with output
HookA script or action on an eventSomething must happen every time without asking
MCPConnection to an external systemYou keep copying data from a tab Claude cannot see
PluginA bundle of the aboveA 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. A PreToolUse hook 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#

1. CLAUDE.mdrepeated mistakes2. Skillsrepeated prompts3. MCPexternal data4. Subagentsnoisy side tasks5. Hooksmust-run rules6. Pluginsreuse across repos
Let each problem tell you what to add. You do not need all of it up front.

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 / or when Claude decides it is relevant, and holds reference material or repeatable workflows.

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.