Skills for Bots › Guides › SKILL.md vs AGENTS.md vs CLAUDE.md

SKILL.md vs AGENTS.md vs CLAUDE.md: which file does what

All three are Markdown files of instructions for an AI agent, which is why people mix them up. The difference is when the agent reads them and what they’re for. Here’s the short version, then the details.

Last updated:

The short answer

If you use a bot for everyday life rather than code, SKILL.md is usually the one you want. The other two are mostly for software projects.

Side by side

SKILL.mdAGENTS.mdCLAUDE.md
ScopeOne task or workflowOne repositoryA project, your user account, or an organization
When it loadsName and description at start; the body only when usedAs context when an agent works in the repoAt the start of every Claude Code session
Required fieldsname and description in YAML frontmatterNone. Plain MarkdownNone. Plain Markdown
Where it goesA folder per skill, such as .agents/skills/my-skill/SKILL.mdThe repo root, plus nested files for subprojects./CLAUDE.md, ./.claude/CLAUDE.md, or ~/.claude/CLAUDE.md
Can bring files?Yes: scripts/, references/, assets/No, but it can point to docsIt can import other files
Read byMany tools, including Claude, ChatGPT and Codex, Cursor, GitHub Copilot, Gemini CLI, OpenClaw, and Grok BotMany coding agents, including Codex, Cursor, Gemini CLI, Copilot’s coding agent, and Claude CodeClaude Code
StewardAgentic AI Foundation (open standard)Agentic AI Foundation (open format)Anthropic

SKILL.md: a job, loaded when needed

A skill is a folder with a SKILL.md file. The top has YAML frontmatter with two required fields. The spec says name is up to 64 characters of lowercase letters, numbers, and hyphens, matching the folder, and description is up to 1,024 characters saying what the skill does and when to use it.

The key idea is progressive disclosure. The agent loads every skill’s name and description at startup, which is small. It reads the full instructions only when it decides a skill fits, and reads extra files only when needed. That’s why you can install many skills without filling the agent’s memory.

Claude Code’s docs give a good rule of thumb: make a skill when you keep pasting the same instructions or checklist, or when a section of CLAUDE.md has grown into a procedure rather than a fact. My annotated SKILL.md template shows every part.

AGENTS.md: a README for coding agents

The AGENTS.md site describes it as “a README for agents”: a predictable place for the build steps, tests, and conventions a coding agent needs, kept out of the human README. It has no required fields. The site says it’s used by over 60,000 open-source projects and is now stewarded by the Agentic AI Foundation under the Linux Foundation.

Two rules from its FAQ are worth knowing. In a monorepo, the closest AGENTS.md to the file being edited wins. And your explicit chat prompts override everything in the file.

An AGENTS.md isn’t a skill. It doesn’t load on demand, it isn’t a reusable job, and it doesn’t travel from repo to repo. It’s the house rules for one codebase.

CLAUDE.md: Claude Code’s project memory

Claude Code reads CLAUDE.md files at the start of every session to carry instructions across chats. The docs list several places for them: a managed policy file for an organization, ~/.claude/CLAUDE.md for your own preferences across projects, ./CLAUDE.md or ./.claude/CLAUDE.md for a project, and CLAUDE.local.md for personal project notes you keep out of version control.

On AGENTS.md, the docs say Claude Code reads it when the repo has no CLAUDE.md, reads only CLAUDE.md when both exist, and can include AGENTS.md through an import. They also note that these files are treated as context, not enforced configuration.

Which one should I write?

Using them together

In a code project, a common setup is an AGENTS.md for the always-true facts (how to run tests, which folders matter), a CLAUDE.md that imports it if anyone uses Claude Code, and skills for repeatable procedures like releasing a version or writing a changelog. Keep each fact in one place. If the same rule appears in two files, they will drift apart.

Safety rules are the exception I repeat on purpose. I put no-send and no-spend rules in the always-loaded file and in each skill that could send or spend, because a skill may run in a tool that never reads the other file.

Moving instructions from one to another

  1. Find sections of your CLAUDE.md or AGENTS.md that read like a procedure: numbered steps, a checklist, an output format.
  2. Move each one into its own skill folder with a clear name and a description that says when to use it.
  3. Leave one line behind, such as “For releases, use the release skill.”
  4. Check the new file with my SKILL.md checker, then test that the agent picks it up.

Cursor has a built-in /migrate-to-skills skill that converts some rules and slash commands into skills, per its docs.

FAQ

Is AGENTS.md the same as SKILL.md?

No. AGENTS.md holds standing instructions for coding agents working in one repository. SKILL.md teaches an agent one job and loads only when a task matches it.

Does Claude Code read AGENTS.md?

Yes. Its docs say Claude Code reads AGENTS.md when a repo has no CLAUDE.md, reads only CLAUDE.md when both exist, and can include AGENTS.md through an import.

Do I need all three files?

No. For everyday bot use, skills are usually enough. AGENTS.md and CLAUDE.md are mainly for software projects.

Which file has required fields?

Only SKILL.md. It needs a name and a description in YAML frontmatter. AGENTS.md and CLAUDE.md are plain Markdown with no required fields.

Sources

I read each source on November 23, 2026. Products change often, so check the vendor page before you rely on a detail.

Skill files are instructions to the bot, not a hard technical block. A bot can still ignore or misread them, so test before you rely on them. Nothing on this page is legal, financial, or professional advice. Provided as is, with no warranty.