Skills vs MCP vs CLAUDE.md: which one fixes your problem
Use CLAUDE.md for short rules that apply to every task. Use a skill for a procedure the agent needs only sometimes. Use an MCP server when the agent needs to reach something it cannot reach today, like a database, a browser or a SaaS API.
Picking the wrong one is a common cause of bad agent output: a 400-line CLAUDE.md that buries the rules that matter, or a skill that tries to give the agent access it does not have.
| CLAUDE.md | Skill (SKILL.md) | MCP server | |
|---|---|---|---|
| What it is | Markdown rules | A folder of instructions, scripts and references | A program that exposes tools and data |
| When it loads | At the start of every session | Only when the task matches its description, or when you call /skill-name | Its tools are listed every session; they run when called |
| Context cost | Every line, every session | Almost nothing until used | Tool descriptions every session |
| Good for | Commands, style, boundaries | Multi-step procedures, checklists, domain know-how | Access: databases, browsers, tickets, docs search |
| Works in | Claude Code (AGENTS.md for other agents) | Claude Code, Cursor, Codex and other agents | Most agents with MCP support |
Use CLAUDE.md when
- The rule applies to almost every task: the test command, the code style, "never edit generated files".
- It fits in a line or two. Anthropic's docs suggest keeping each CLAUDE.md under about 200 lines.
Use a skill when
- It is a procedure with steps: a release checklist, a code review, a migration recipe.
- It only matters for some tasks. The docs put it plainly: a skill's body loads only when it is used, so long reference material costs almost nothing until you need it.
- You want the same know-how in Claude Code, Cursor and Codex: they all read SKILL.md.
Use an MCP server when
- The agent needs to read or change something outside the repo: a database, an issue tracker, a browser, a design file.
- Instructions alone cannot help because the agent has no way to reach the data.
They work together
A common setup: CLAUDE.md lists the commands and says "use the db-migration skill for schema changes"; the skill holds the step-by-step migration procedure; an MCP server for your database lets the agent check the result. Each piece does one job.
If your agent ignores a long CLAUDE.md, move the procedures out of it into skills first. It is the cheapest fix with the biggest effect on what stays in context.