AGENTS.md vs CLAUDE.md: which one should you use?

Use AGENTS.md: 6 of the 9 agents we score read it, and Claude Code falls back to it. If you also need a CLAUDE.md, start it with @AGENTS.md, or Claude Code skips AGENTS.md.

Both hold the same content. AGENTS.md is the shared name; CLAUDE.md is Claude Code's.

Which agents read AGENTS.md and which read CLAUDE.md?

Whether each AI coding agent reads AGENTS.md and CLAUDE.md
AgentAGENTS.mdCLAUDE.md
Claude CodeWhen there is no CLAUDE.mdYes
CursorYesYes
DevinYesYes
CodexYesNo
Kimi Code CLIYesNo
Gemini CLIWhen configured toNo
AiderWhen configured toNo
OpenHandsYesYes
PiYesYes

Every file each agent reads, with links to their docs.

What does Claude Code do when a repo has both?

  • AGENTS.md onlyAGENTS.md
  • AGENTS.md and CLAUDE.mdCLAUDE.md only
  • AGENTS.md, and a CLAUDE.md that imports it with @AGENTS.mdBoth

Needs Claude Code v2.1.277 or later. A .claude/CLAUDE.md or CLAUDE.local.md counts as a CLAUDE.md. Claude Code's docs also cover a setting that loads both.

How many repos use AGENTS.md and how many use CLAUDE.md?

Of 401 leaderboard repos, 204 have an AGENTS.md (51%) and 17 only a CLAUDE.md (4%). Empty files don't count.

Our AGENTS.md check passes either name; the choice only changes which agents find it. Read both kinds in popular repos.

For other agents: Cursor rules vs AGENTS.md, GEMINI.md vs AGENTS.md.