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 (now Devin Desktop), 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.

Make Claude Code read both files (the /config setting)

Type /config in a Claude Code session and set Project instructions to one of these:

ValueWhat Claude reads
claude-md-or-agents-mdThe default. Your CLAUDE.md files, or AGENTS.md when there's no CLAUDE.md or CLAUDE.local.md in your folder or above it.
claude-md-and-agents-mdBoth. Each folder's CLAUDE.md first, then its AGENTS.md. An AGENTS.md you already import isn't read twice. Pick this if you keep a CLAUDE.local.md.
claude-mdCLAUDE.md files only.
managed-onlyOnly your organization's managed CLAUDE.md (plus auto memory).

To set it once for every project, put this in ~/.claude/settings.json (Claude Code ignores it in a project's settings file):

{
  "pluginConfigs": {
    "cc-plugin-agents-md@builtin": {
      "options": { "instructionFiles": "claude-md-and-agents-md" }
    }
  }
}

Claude Code never reads AGENTS.local.md, AGENTS.override.md (that one is Codex's) or anything under .agents/.

AGENTS.md not loading in Claude Code? Check these 3 things

  1. A CLAUDE.md is in the way. Look for CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your folder or any folder above it (your personal ~/.claude/CLAUDE.md doesn't count). Add @AGENTS.md to it, or switch the setting to claude-md-and-agents-md.
  2. Old version. Run claude --version. Reading AGENTS.md directly needs v2.1.277 or later, and v2.1.281 or later for every session type.
  3. The setting is off. In /config, make sure Project instructions isn't claude-md or managed-only. If the setting isn't there at all, that session can't read AGENTS.md, so import it from a CLAUDE.md.

To check, run /memory and look for your AGENTS.md path in the list.

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.

Matching kit: Vibe Coder Skills Pack ($9)

The free rules set the boundaries. The Skills Pack adds 6 ready-to-copy skills for when a project goes wrong: stop-the-loop, fix-one-bug, leak-check, ship-check, explain-project and builder-handoff, for Claude Code, Cursor and Codex, with paste-in steps for Lovable, Bolt, Replit and Base44.

See the Vibe Coder Skills Pack ($9) →

Instant download. 7-day refund, no questions asked.

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. Want filled-in examples? See CLAUDE.md examples and best practices and AGENTS.md examples. Still picking a tool? See Cursor vs Claude Code vs Codex for beginners (real prices).

Best value

All 6 kits for $29 — or $20.30 with code WELCOME30 (through Nov 30)

All six kits in one download: Tiny Game Builder Kit, Inbox Triage Agent, Codebase Fixer Agent, MVP Spec-to-Build Pack, Discord Bot Builder and the Vibe Coder Skills Pack. The five build kits are one markdown file each (agent brief, setup steps, worked example); the Skills Pack adds a zip of 6 SKILL.md skill folders.

Get all 6 kits for $29 → See what's in each kit

$29 instead of $48 for the six kits bought separately; WELCOME30 takes 30% off that at checkout ($20.30). Instant download from Gumroad. 7-day refund, no questions asked.

Sources

Free rules starter pack for Cursor, Claude Code, Codex and Antigravity

One shared AGENTS.md that works across Cursor, Claude Code, Codex, Copilot and Antigravity, plus database and test rules in each tool's format. Unzip it into your project and fill in two sections. I'll email you the link.

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

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