CLAUDE.md vs Skills vs Hooks vs Subagents vs MCP: Which One Do You Need?
One rule per tool, so you stop guessing
Section titled “One rule per tool, so you stop guessing”Claude Code gives you six ways to extend it, and they look alike at first: they are all “instructions somewhere in a file”. They are not interchangeable. Each one loads at a different moment, costs a different amount of context, and gives a different level of guarantee.
Pick the wrong one and you get the classic symptoms: a CLAUDE.md so long Claude starts ignoring parts of it, a “never touch .env” rule that Claude breaks anyway, or a session that slows down because a side task flooded it with output.
Here is the whole guide in one table. The sections below explain each row.
| You want… | Use | Why |
|---|---|---|
| Claude to always know a rule or command | CLAUDE.md | Loaded every session |
| Reference material or a repeatable workflow, only when needed | Skill | Loaded on demand |
| Something to happen every single time, no exceptions | Hook | Runs as code, not as a request |
| A big side task that would flood your conversation | Subagent | Works in its own context, returns a summary |
| Access to an outside system (database, Slack, browser) | MCP server | Gives Claude real tools |
| The same setup in another repo, or for your team | Plugin | Packages all of the above |
1. CLAUDE.md: the always-on rules
Section titled “1. CLAUDE.md: the always-on rules”What it is: A markdown file Claude Code reads at the start of every session. It is your project’s standing brief.
Put in it: build and test commands, coding conventions, project structure, and short “always / never” rules. For example: “Use pnpm, not npm. Run the tests before committing.”
Keep out of it: long reference documents, API manuals, checklists you only need sometimes. Everything in CLAUDE.md is paid for on every request, and a bloated file buries the rules that matter.
The rule of thumb: Anthropic’s own guidance is to keep it under about 200 lines. When it grows past that, move reference content into skills.
The trigger to add a line: Claude gets the same convention wrong twice. Fix it in CLAUDE.md, not with another correction in chat.
Check yours: paste it into the free CLAUDE.md Checker for an instant review.
2. Skills: knowledge and workflows on demand
Section titled “2. Skills: knowledge and workflows on demand”What it is: A markdown file (a SKILL.md with a name and a description) that holds instructions, reference material or a multi-step workflow. Only the short description sits in context by default. The full content loads when you type /skill-name or when Claude decides the description matches your task.
Two flavours:
- Reference skills: knowledge Claude applies while working, like your API style guide or database schema.
- Action skills: workflows you trigger, like
/deployor/release.
The trigger to write one: you paste the same prompt, playbook or checklist into chat for the third time.
The detail that makes or breaks it: the description. Claude chooses skills by matching your request against descriptions, so a vague one (“helps with code”) either never fires or fires at the wrong time. Write it like a “use when…” sentence.
Safety tip: for skills with side effects (deploying, sending, deleting), set disable-model-invocation: true in the frontmatter so only you can trigger them.
3. Hooks: the only one that is a guarantee
Section titled “3. Hooks: the only one that is a guarantee”What it is: Code that Claude Code runs automatically at a lifecycle event, such as before a tool runs (PreToolUse), after it runs (PostToolUse) or when a session starts (SessionStart). A hook can run a shell command, call a URL, call an MCP tool, or even run a prompt or a subagent.
Why it matters: everything in CLAUDE.md and skills is an instruction. Claude follows instructions very well, but an instruction is a request, not enforcement. A hook always fires on its event.
Use a hook for:
- Running the formatter or linter after every file edit.
- Blocking dangerous commands or edits to protected files.
- Logging, or sending a notification when a session ends.
The rule: if breaking a rule would cost you money, data or a weekend, it belongs in a hook. “Never edit .env” in CLAUDE.md is a polite request. A PreToolUse hook that blocks the edit is a lock.
Context cost: zero, unless the hook returns output (for example, lint errors), which then lands in the conversation for Claude to act on.
4. Subagents: keep the mess out of your main session
Section titled “4. Subagents: keep the mess out of your main session”What it is: A separate Claude worker with its own fresh context window. It does the job, then hands back only a summary.
Use one when:
- A task needs to read dozens of files or run lots of searches, and you only care about the conclusion.
- You want several independent checks running in parallel (security, performance, style).
- You want a specialist with its own instructions and tools.
The trade-off: a subagent starts without your conversation history. It only knows what its own instructions and your hand-off prompt tell it, so a lazy hand-off (“check the thing we discussed”) gives a lazy result. Brief it like a new colleague.
The trigger: a side task floods your conversation with output you will never look at again.
5. MCP servers: hands on outside systems
Section titled “5. MCP servers: hands on outside systems”What it is: The Model Context Protocol connects Claude to external services through purpose-built tools: query a database, read a ticket, post to Slack, drive a browser. The server handles the connection and authentication.
MCP vs skills is the most common mix-up. They solve different problems and work best together:
- MCP gives Claude the ability to reach the system.
- A skill gives Claude the know-how to use it well: your schema, your query patterns, your team’s message format.
The trigger: you keep copying data out of a browser tab so Claude can see it.
Context cost: low. Claude Code loads tool names up front and fetches each tool’s full definition only when it is needed. Disconnect servers you are not using anyway; every tool you expose is one more choice Claude has to weigh.
Security note: an MCP server can read and act on real systems. Treat installing one like installing any software with access to your data, and see Security & Insulation for prompt-injection risks.
6. Plugins: the packaging layer
Section titled “6. Plugins: the packaging layer”A plugin is not a new kind of capability. It bundles skills, hooks, subagents and MCP servers into one installable unit, so you can reuse a setup across repositories or share it with a team. Build the pieces first; package them once a second project needs them.
How they combine in a real setup
Section titled “How they combine in a real setup”The strongest setups use each tool for what it is good at:
- CLAUDE.md says “follow our API conventions”. A skill holds the full API style guide.
- MCP connects to the database. A skill documents the schema and the safe query patterns.
- A
/auditskill launches three subagents in parallel and merges their findings. - A hook runs the linter after every edit, and its output tells Claude what to fix.
The build-it-over-time order
Section titled “The build-it-over-time order”You do not need all six on day one. Most people add them in roughly this order, each one when its trigger shows up:
- CLAUDE.md when Claude repeats a mistake.
- Skills when you repeat a prompt.
- MCP when you keep copying data in by hand.
- Subagents when side tasks clutter your session.
- Hooks when a rule must never be broken.
- Plugins when a second repo needs the same setup.
Sources: Anthropic’s Extend Claude Code documentation, which also covers newer options such as output styles and dynamic workflows. Feature details change often, so check the docs for the current specifics.
Next: Context Engineering, the thinking behind why these load the way they do.
Hands-on: Build Your First MCP Server, a tested step-by-step tutorial.
Privacy policy · Privacy & cookie settings · © 2026 Guayoverse · Logo AI-generated with Google Gemini