What is AGENTS.md?
AGENTS.md is a README for AI coding agents. Your README tells humans what a project is; AGENTS.md tells an agent how to work on it: which commands install, test and lint the code, which style to follow, and what it must not do. It's plain Markdown with no required fields, and it lives in the root of your repo.
It started as a shared effort between OpenAI Codex, Amp, Google's Jules, Cursor and Factory, and is now stewarded by the Agentic AI Foundation under the Linux Foundation. Codex, Cursor, GitHub Copilot, Jules, Gemini CLI, Aider, Zed, Windsurf, Devin, Junie and many more read it.
AGENTS.md vs CLAUDE.md
| AGENTS.md | CLAUDE.md | |
|---|---|---|
| Read by | Most coding agents | Claude Code |
| Format | Plain Markdown, any headings | Plain Markdown, plus @path imports |
| Where | Repo root, plus one per package in a monorepo (closest file wins) | Repo root or .claude/CLAUDE.md; personal rules in ~/.claude/CLAUDE.md; private project notes in CLAUDE.local.md |
| Size | No limit set; shorter is better | Anthropic recommends under 200 lines |
Use both. Put the shared rules in AGENTS.md and make CLAUDE.md a one-line import:
@AGENTS.md
## Claude Code
- Use the /release skill to publish a new version.
Claude Code loads AGENTS.md through the import, and every other agent reads AGENTS.md directly. You maintain one set of rules. Newer versions of Claude Code can also read AGENTS.md on their own, but only when there is no CLAUDE.md, so the import is the reliable way to get both.
What to put in it (and what to leave out)
- Exact commands. Install, test, lint, type-check, and how to run a single test. Agents run these to check their own work before they finish.
- Rules you'd otherwise repeat. Anything you've had to correct twice belongs here.
- Things the code doesn't say. Decisions made outside the repo, misleading names, the test that needs a running server.
- Leave out what an agent can find by reading the repo: folder tours, dependency lists, long architecture essays. Every line is read on every task.
- Write plainly. "Use 2-space indentation" beats "format code properly". Anthropic's guidance is that current models follow plain wording, and piling on IMPORTANT and ALL CAPS makes them over-apply a rule.
- No secrets. This file is committed to git. Never paste API keys or database URLs into it.
For things that must never happen (force-pushing, deleting a database), don't rely on a line of text: in Claude Code, use a hook or a permission deny rule, which are enforced every time.
What the checker looks for
| Check | Why |
|---|---|
| API keys, tokens, private keys, database passwords | The file gets committed and shared |
| Missing commands or test command | Agents need them to verify their work |
| Over 200 lines (CLAUDE.md) | Anthropic's recommended size |
| Vague rules ("best practices", "clean code") | Nothing the agent can act on |
| Shouting (IMPORTANT, MUST, NEVER…) | Makes the model over-apply rules |
| Paths from one person's machine | Breaks for everyone else |
| Duplicate headings, TODOs, placeholders | Contradictions and unfinished rules |
@imports | Listed for CLAUDE.md; flagged in AGENTS.md, where other agents can't follow them |
Next step: teach your agent a skill
AGENTS.md holds the rules for every task. For a repeatable job (writing commits, reviewing a PR, shipping a release) write a skill instead: it only loads when needed. Make one with the SKILL.md generator.
FAQ
What is AGENTS.md?
AGENTS.md is a plain Markdown file in the root of a repository that tells AI coding agents how to work on the project: the commands to install, test and lint, the code style, and the rules to follow. It is an open format now stewarded by the Agentic AI Foundation under the Linux Foundation, and is read by Codex, Cursor, GitHub Copilot, Jules, Gemini CLI, Aider, Zed, Windsurf and many more.
Does AGENTS.md need special fields or frontmatter?
No. It is standard Markdown and you can use any headings you like. Popular sections are a project overview, build and test commands, code style, testing instructions and security notes.
Does Claude Code read AGENTS.md?
Recent versions of Claude Code can read AGENTS.md, but by default only when there is no CLAUDE.md. The approach Anthropic recommends for sharing one file between tools is a CLAUDE.md that contains the line @AGENTS.md, with any Claude-only instructions below it. That is what this generator creates.
How long should CLAUDE.md be?
Anthropic recommends keeping each CLAUDE.md under 200 lines. Longer files use more context and Claude follows them less reliably. Move step-by-step procedures into skills and rules for specific folders into .claude/rules/.
Should I use a symlink instead of @AGENTS.md?
A symlink (ln -s AGENTS.md CLAUDE.md) works if you have no Claude-specific notes, but Claude cannot edit a file through a symlink, and on Windows symlinks need admin rights or Developer Mode and Git may check them out as plain text files. The @AGENTS.md import works everywhere.
Which file wins in a monorepo?
Put an AGENTS.md in each package that needs its own rules. Agents read the file closest to the code being edited, so the nearest AGENTS.md takes precedence, and an explicit instruction in the chat overrides them all.
Does this tool upload my files?
No. The generator and the checker run entirely in your browser. Nothing you type or paste is sent anywhere.