Home › Rules › AGENTS.md vs CLAUDE.md

AGENTS.md vs CLAUDE.md: which one do you need?

Checked against Anthropic's and agents.md's docs on Oct 19, 2026.

Short answer: write one AGENTS.md. If you use Claude Code too, either let it read AGENTS.md directly or add a one-line CLAUDE.md that imports it. Don't maintain two copies.

The difference

AGENTS.mdCLAUDE.md
Who reads itMany tools: OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Zed, Aider and others listed on agents.md. Claude Code too, in some cases (below).Claude Code. GitHub Copilot also reads it in some surfaces.
FormatPlain Markdown, no required fieldsPlain Markdown, plus @path imports
LocationsRepo root, plus optional nested files in subfolders./CLAUDE.md or ./.claude/CLAUDE.md, personal ~/.claude/CLAUDE.md, private CLAUDE.local.md
Who maintains itAn open format, stewarded by the Agentic AI Foundation (Linux Foundation)Anthropic

How Claude Code handles AGENTS.md

Per Anthropic's docs (Claude Code v2.1.277 or later):

That middle case catches people: adding a personal CLAUDE.local.md quietly stops Claude from reading your shared AGENTS.md. The import avoids it.

The setup we recommend

AGENTS.md (the real rules live here)
# AGENTS.md
(your shared rules: project, commands, rules, how to work)
CLAUDE.md (one import + Claude-only extras)
@AGENTS.md

## Claude Code
- Use plan mode before any change that touches more than 3 files.

A symlink (ln -s AGENTS.md CLAUDE.md) also works, but Anthropic's docs recommend the import if anyone on the project uses Windows, where Git may check symlinks out as plain text files.

When CLAUDE.md alone is fine

You only ever use Claude Code, and you want Claude features like @ imports of other docs. Even then, naming the file AGENTS.md costs nothing and keeps your options open if you try Codex or Cursor later.

Get a ready-made file

Every file in the rules library comes as AGENTS.md with the CLAUDE.md import ready to copy. Or generate a CLAUDE.md for your project.

Sources

Get the free Starter Rules, emailed instantly

  • A copy-paste rules file to save as AGENTS.md or CLAUDE.md, or paste into Lovable, Bolt, v0 or Replit: small steps, ask before risky changes, no fake "it works", secrets kept out of code.
  • A kickoff prompt that makes your AI ask up to 3 questions and plan 5 to 8 small, testable steps before it writes any code.
  • The habit that saves projects: work, test, commit.

After that, an occasional email when we publish a new guide or rules file.

Free. No spam. Unsubscribe anytime. See our privacy note.