AGENTS.md is an open format that most coding agents read for project instructions, including Codex, Cursor, GitHub Copilot and Gemini CLI. CLAUDE.md is Claude Code’s own file. Claude Code now reads AGENTS.md too, when a project has no CLAUDE.md, so one file can brief every agent your team uses.
What is AGENTS.md?
AGENTS.md is a Markdown file at the root of a repository that tells coding agents how to work in it: how to build and test, the code style, and anything a new contributor would need. Its own site calls it “a README for agents”. It has no required fields.
The format grew out of work between OpenAI Codex, Amp, Google’s Jules, Cursor and Factory, and is now stewarded by the Agentic AI Foundation under the Linux Foundation. In a monorepo you can put an AGENTS.md in each package, and agents read the nearest one, so the closest file to the code being edited wins.
What is CLAUDE.md?
CLAUDE.md is Claude Code’s memory file: plain Markdown that Claude Code reads at the start of every session. It can live in several places, and Claude Code loads all of them, broadest first.
| File | Where | Who it is for |
|---|---|---|
| Project | ./CLAUDE.md or ./.claude/CLAUDE.md | The whole team, through the repository |
| Local | ./CLAUDE.local.md (add it to .gitignore) | Only you, in this project |
| User | ~/.claude/CLAUDE.md | Only you, in every project |
| Managed policy | A system folder set by IT | Everyone in the organization |
Claude Code also reads CLAUDE.md files in folders above where you start it, and loads the ones in subfolders when it works there. A CLAUDE.md can pull in other files with @path, for example @docs/testing.md.
Which file does each coding agent read?
| Agent | Reads | Notes |
|---|---|---|
| Claude Code | CLAUDE.md, or AGENTS.md when there is no CLAUDE.md | Reading AGENTS.md directly needs version 2.1.277 or later |
| Codex | AGENTS.md | Also ~/.codex/AGENTS.md for you, and AGENTS.override.md to override a folder |
| Cursor | .cursor/rules/*.mdc and AGENTS.md | The Cursor CLI also reads a CLAUDE.md at the project root |
| GitHub Copilot, Gemini CLI, Junie, Amp, OpenCode, Kilo Code | AGENTS.md | Listed as supporting it on agents.md |
Checked against each maker’s documentation on 12 October 2026.
How do you use one file for every agent?
- Write your project instructions in AGENTS.md at the root of the repository and commit it.
- If you do not need Claude-only instructions, stop there: Claude Code reads AGENTS.md when there is no CLAUDE.md.
- If you do, create a CLAUDE.md that starts with the line @AGENTS.md, then add the Claude-only parts below it. Claude Code reads both; other agents read AGENTS.md.
- In a monorepo, add an AGENTS.md to each package that needs its own commands or rules.
- Keep personal preferences out of the shared file: CLAUDE.local.md and ~/.codex/AGENTS.md are for you alone.
A CLAUDE.md that shares AGENTS.md with every other tool:
@AGENTS.md
## Claude Code only
- Use the test-writer subagent for new tests.
- Run /review before opening a pull request.What should go in AGENTS.md or CLAUDE.md?
The AGENTS.md project suggests a project overview, build and test commands, code style, testing instructions and security considerations. Write what an agent would get wrong without being told, and leave out what it can read from the code.
# AGENTS.md
## Setup
- Install: pnpm install
- Dev server: pnpm dev
## Tests
- Run pnpm test before every commit; all tests must pass.
- Tests sit next to the file they cover, as name.test.ts.
## Style
- TypeScript strict mode. No default exports.
- Use the logger in src/log.ts, never console.log.
## Don’t
- Edit files in src/generated/; run pnpm codegen instead.- Keep it short. Anthropic suggests under 200 lines for a CLAUDE.md, because every line is loaded into every session.
- Be specific: “run pnpm test” beats “test your changes”.
- Remove rules that contradict each other; an agent may follow either one.
- Run /init in Claude Code to draft a CLAUDE.md from your codebase, then edit it.
How does Friday Work use AGENTS.md?
Friday Work runs Claude Code, Codex, Cursor and 11 more coding agents side by side in one session. Each reads the project’s instruction files as it normally would. Friday adds a project brain: what agents learn on a repository, from every tool, briefs the next agent that works on it.
Sources
- AGENTS.md, the Agentic AI Foundation
- How Claude remembers your project, Claude Code docs
- Custom instructions with AGENTS.md, Codex docs
- Rules, Cursor docs