# Skills vs CLAUDE.md, Commands, Subagents, MCP and Hooks — Claude Code Skills & SKILL.md

Source: https://www.geekswithgeeks.com/en/claude-code-skills/b-compare

> Pick the right mechanism for each need.

## Several tools, different jobs

Claude Code offers several ways to customise behaviour, and choosing well keeps things simple. **CLAUDE.md** (project memory) holds facts and rules that should be in context **every session**: build commands, conventions, "never edit generated files". **Skills** hold **procedures for specific tasks** that should load only when relevant. **Slash commands** are prompts **you** trigger explicitly (in current versions skills can also be invoked by name with a slash, so the two are converging). **Subagents** are helpers with their own context and tool permissions, good for isolating noisy research or review. **MCP servers** connect Claude to external tools and data (databases, issue trackers, browsers). **Hooks** run **deterministic shell commands** on events (before a tool call, after an edit), for rules that must always happen. A skill can combine these: its instructions may call scripts, use MCP tools, or tell Claude when to delegate to a subagent.

## Which mechanism for which need

A rough guide; features and names change, so verify in the docs.

```text
Need                                                      Mechanism
facts/rules needed in EVERY session                         CLAUDE.md
a procedure for a specific, recurring task                  skill
I want to trigger a canned prompt myself                    slash command (or a skill invoked by name)
isolate noisy research/review in its own context           subagent
reach an external system (DB, tracker, browser)             MCP server
rule that must ALWAYS happen (format after edit, block rm)  hook (deterministic script)
bundle several of the above for a team                      plugin
```

## Combine, do not duplicate

Put facts in CLAUDE.md and procedures in skills; do not copy the same text into both.

**Quiz:** A rule must run every single time, such as formatting a file after each edit. Which mechanism fits best?

- [ ] A skill description, hoping Claude remembers
- [x] A hook, because it runs deterministically
- [ ] A longer prompt
- [ ] A subagent

*Answer:* A hook, because it runs deterministically. Skills are guidance the model may follow; hooks are guaranteed to run.
