# Claude Code skills vs hooks vs subagents vs MCP

> CLAUDE.md, skills, subagents, hooks, MCP and plugins all extend Claude Code. What each one is for, how it loads into context and which to reach for first.

Source: https://devaiper.com/blog/claude-code-skills-hooks-subagents
Published: 2026-10-08
Topics: Claude Code, Skills, Hooks, MCP, Subagents

**Short answer:** Use CLAUDE.md for always-on rules, skills for on-demand knowledge and workflows, subagents for isolated side tasks, hooks for things that must happen every time, and MCP to connect external systems. Add them when a specific problem shows up.

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

> **Diagram:** Always-on versus on-demand versus automated. CLAUDE.md is always loaded into every session. Skills and MCP tool schemas load on demand. Subagents run in isolated context. Hooks run outside the conversation on events and cost no context unless they return output.
> Context Claude reads: CLAUDE.md: always loaded, every request; Skills: descriptions always, full text when used; MCP: tool names, schemas on demand; Subagents: separate window, summary returned. Automation that just runs: Hooks: fire on lifecycle events; Deterministic: no model judgment; Zero context unless they print output; Use for must-never and must-always rules.

## 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](https://devaiper.com/blog/claude-md-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. 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](https://devaiper.com/blog/claude-code-mcp-servers)), then write a skill describing how your team uses it.

## Add them in this order

> **Diagram:** A sensible order for building a Claude Code setup over time. Start with CLAUDE.md, then add a skill for repeated prompts, then MCP for external data, then subagents for noisy side tasks, then hooks for must-run automation, then plugins to share across repositories.
> 1. CLAUDE.md (repeated mistakes) → 2. Skills (repeated prompts) → 3. MCP (external data) → 4. Subagents (noisy side tasks) → 5. Hooks (must-run rules) → 6. Plugins (reuse 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](https://devaiper.com/blog/what-is-context-engineering) applied to your own workspace.

New here? Start with [what Claude Code is](https://devaiper.com/blog/what-is-claude-code) and [10 habits that get better results](https://devaiper.com/blog/claude-code-tips). Official overview: [Extend Claude Code](https://code.claude.com/docs/en/features-overview).

## FAQ

### 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.

