Comparison
AGENTS.md vs Agent Skills: which one you need, and where MCP fits
AGENTS.md vs Agent Skills: what an instruction file and a skill each do for a coding agent, when to use which, and how MCP servers fit alongside both of them.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
If you use a coding agent such as Claude Code, Codex or Cursor, you have three common ways to teach it about your work: an instruction file (AGENTS.md or CLAUDE.md), Agent Skills (folders with a SKILL.md), and MCP servers. They overlap enough to cause confusion, and they are often presented as competitors. They are not. Each solves a different problem, and most well-set-up projects use all three. This page focuses on the instruction file and the skill, with MCP alongside; for the two-way decision on its own, see Agent Skills vs MCP.
The short answer
- AGENTS.md / CLAUDE.md is for facts and rules that apply to almost every task in a project: how to build and test, conventions, boundaries. It is always loaded.
- An Agent Skill is for know-how that applies to some tasks: a procedure, a checklist, a way to use a tool well, optionally with scripts and reference files. Only its name and description are loaded until a task needs it.
- An MCP server is for capabilities the agent does not have: access to a system, an API or data, exposed as tools. It runs as a separate program.
One way to remember it: instruction files tell the agent how this project works, skills teach it how to do a kind of task, and MCP servers give it new abilities.
Side by side
| AGENTS.md / CLAUDE.md | Agent Skill | MCP server | |
|---|---|---|---|
| What it is | A Markdown file in the repository | A folder with SKILL.md, optional scripts and references |
A program that speaks the Model Context Protocol |
| What it adds | Context and rules | Instructions, and optionally scripts the agent can run | Tools, resources and prompts the agent can call |
| When it loads | Every session | Name and description at start; the rest when relevant | Tool definitions at start; tools run when called |
| Context cost | Every line, every session | Small until used | Every tool’s description, every session |
| Runs code? | No | Can bundle scripts the agent runs | Yes, the server itself is code |
| Portability | AGENTS.md is read by most agents; CLAUDE.md by Claude Code |
Open format at agentskills.io, read by many agents | Open protocol, supported by most hosts |
| Typical size | Tens to a couple of hundred lines | One focused task per skill | A handful of tools per server |
When to use an instruction file
Use AGENTS.md (or CLAUDE.md) for what a new teammate would need to know before touching anything:
- Build, test and lint commands.
- Conventions that are not obvious from the code.
- Boundaries: generated files, directories that need human review, services not to call.
Keep it short. Because it is always loaded, every line competes for attention with the task at hand. If a section only matters for one kind of work, it probably belongs in a skill. See CLAUDE.md and AGENTS.md for details.
When to use a skill
Use a skill when you find yourself explaining the same multi-step procedure to the agent again and again, or when a task needs specialised knowledge most tasks do not:
- “How we add a database migration” (with the commands and checks).
- “How to fill in our PDF forms” (with a script that does the fiddly part).
- “Our code review checklist” (invoked when reviewing).
- “How to use our internal CLI well.”
Skills rely on progressive disclosure. The agent sees each installed skill’s name and description, which is a few dozen tokens each, and loads the full instructions only when a task matches. That means you can have many skills installed without filling the context. It also means the description is the most important line in the skill: it is what the agent uses to decide whether to load it.
Skills are also the most portable of the three. The Agent Skills format was published as an open standard in December 2025, and the same folder works in Claude Code, Codex, Cursor, GitHub Copilot, Antigravity and other agents, though each looks for skills in slightly different directories and some clients add their own frontmatter fields. Our Agent Skills directory shows install commands per agent and flags fields that are not portable.
When to use an MCP server
Use an MCP server when the agent needs to reach something it cannot otherwise reach, or when the access needs to be controlled:
- A SaaS API that needs OAuth (issue trackers, CRMs, monitoring tools).
- A database or internal service, with credentials and permissions held by the server rather than the agent.
- A capability that needs a long-running process, such as driving a browser.
If the agent can already do the job with a command-line tool it has access to, a skill that explains how to use that CLI is often simpler, cheaper in context, and easier to audit than a server. Many vendors now ship both: an MCP server for access, and a skill that explains how to use it well.
How they work together
A realistic setup for a web team:
AGENTS.mdlists the commands and says that database access goes through the repositories layer.- A
db-migrationskill explains how to write, test and roll back a migration, with a script that checks the migration is reversible. - A Postgres MCP server gives read-only access to the staging database so the agent can check the current schema.
When someone asks the agent to add a column, it follows the conventions from AGENTS.md, loads the migration skill because the task matches its description, and uses the MCP server to inspect the real table. Each layer does one job.
Security differs too
All three are text the model reads, so all three can carry instructions you did not intend, including from third parties. But the risks are not equal:
- An instruction file is in your repository and reviewed like code.
- A third-party skill can include scripts that run with your permissions. Read it before installing; the audit workflow shows how.
- A third-party MCP server is a program you run (or a remote service you grant access to). Its tool descriptions and results flow into the model’s context, which makes it a channel for prompt injection as well as ordinary supply-chain risk.
Summary
Start with a short AGENTS.md. Add skills for procedures you repeat. Add MCP servers when the agent needs access it does not have. Review anything from a third party before you install it, and keep each layer doing the one thing it is good at.
Next: What are Agent Skills?, how to write CLAUDE.md and AGENTS.md, MCP explained and the build and share an Agent Skill workflow.
Covers
Related
- What are Agent Skills (Claude skills)?
Claude skills, or Agent Skills, are folders with a SKILL.md file that agents load on demand. What goes in one, how loading works and when a skill fits.
- MCP explained: hosts, clients, servers and transports
What MCP is and how the Model Context Protocol connects AI apps to tools and data: hosts, clients, servers, transports and what the 2026-07-28 spec changed.
- CLAUDE.md and AGENTS.md: instruction files for coding agents
CLAUDE.md vs AGENTS.md: what to put in each, where Claude Code, Codex, Cursor and Copilot look for them, and how to keep one source of truth without drift.
- Ship a team Agent Skill end to end: build, test, share
An Agent Skill example project from idea to install: write SKILL.md, validate it against the spec, test when it fires and share it with one install command.
- Agent Skills cheat sheet
Where Claude Code, Codex, Cursor, Copilot and Antigravity look for Agent Skills, the install command for each, how to invoke a skill and the size budgets.