AI coding agents no longer agree on a single file name, but they are converging. AGENTS.md is the cross-tool format, CLAUDE.md is still what Claude Code loads first, .cursor/rules/*.mdc is Cursor’s scoped rule system, and .cursorrules is legacy. This guide shows which tool reads which file today, then what 113 source-audited open-source repositories in the STACK IT FAST directory actually ship.
1. Which file each tool reads
| Tool | Reads | Notes |
|---|---|---|
| Cursor | .cursor/rules/*.mdc, AGENTS.md (root and nested), CLAUDE.md, legacy .cursorrules | Rules are merged. Nested AGENTS.md files take precedence for their subtree. CLAUDE.md is always applied. |
| Claude Code | CLAUDE.md; AGENTS.md only where no CLAUDE.md exists | AGENTS.md fallback shipped in v2.1.277 (September 2026). A CLAUDE.md in the folder wins. |
| OpenAI Codex | AGENTS.md | The format started here and now lives under the Linux Foundation’s Agentic AI Foundation. |
| GitHub Copilot | .github/copilot-instructions.md; AGENTS.md for the coding agent | AGENTS.md support for the Copilot coding agent arrived in August 2025. |
| Other agents | AGENTS.md | Gemini CLI, Jules, Windsurf, Zed, Aider, Factory, Amp, Devin and more are listed on agents.md. |
Two consequences matter in practice:
- Claude Code ignores your AGENTS.md if a CLAUDE.md sits next to it. The fallback only applies to folders without a CLAUDE.md. Reports also note the fallback depends on Claude Code’s feature flags, so it may not apply on Bedrock, Vertex or with telemetry disabled.
- Cursor applies CLAUDE.md to everything. Anything Claude-specific you put there also reaches Cursor sessions, with no way to scope it.
2. What 113 open-source repos actually ship
We checked the root of every repository in the directory at the exact commit its deep dive was audited against.
| File at repo root | Repos | Share |
|---|---|---|
| Any agent instruction file | 78 | 69.0% |
AGENTS.md | 62 | 54.9% |
CLAUDE.md | 61 | 54.0% |
.claude/ directory (commands, agents, settings) | 44 | 38.9% |
.cursor/rules/ | 15 | 13.3% |
.github/copilot-instructions.md | 11 | 9.7% |
.cursorrules (legacy) | 3 | 2.7% |
GEMINI.md | 1 | 0.9% |
AGENTS.md and CLAUDE.md usually travel together. 49 repos ship both, 13 ship only AGENTS.md (for example Astro, Temporal, Mattermost and Logto), and 12 ship only CLAUDE.md (for example Medusa, Hasura and OpenObserve). The 13 AGENTS.md-only repos are the ones whose instructions Claude Code started reading in September 2026.
In the 49 repos that ship both, maintainers solve the duplication three ways:
| How CLAUDE.md relates to AGENTS.md | Repos |
|---|---|
Pointer: a symlink or a one-line @AGENTS.md import | 21 |
| Own content that references AGENTS.md | 15 |
| Fully separate file | 13 |
Projects using the pointer pattern include n8n, Sentry, Grafana, Gitea and Supabase Studio. Cal.com, Twenty and LibreChat keep a separate CLAUDE.md.
Cursor’s own scoped rules are much rarer: 15 repos ship a .cursor/rules/ directory, including PostHog, shadcn/ui, tRPC and Trigger.dev, and only 3 still carry a legacy .cursorrules.
3. The setup we recommend
- Write
AGENTS.mdas the source of truth. Build commands, test commands, code style, directory map and non-negotiables. It is the one file every major agent reads. - Make
CLAUDE.mda pointer. Start it with@AGENTS.md, then add only Claude-specific instructions (for example sub-agent or hook conventions). This keeps Claude Code on the same rules even though it prefers CLAUDE.md. - Use
.cursor/rules/*.mdconly for scoped rules. Glob-attached rules (for example only for*.sqlorapps/api/**) are where Cursor’s format adds something AGENTS.md cannot. - Delete
.cursorrules. Move its content into an always-apply.mdcrule or into AGENTS.md. - Nest AGENTS.md in monorepos. A short AGENTS.md per package keeps instructions close to the code; Cursor and Codex apply the nearest file.
4. Migrating from .cursorrules
.cursorrules → delete
project-wide conventions → AGENTS.md
rules for specific paths → .cursor/rules/<name>.mdc (globs: ["apps/api/**"])
CLAUDE.md (if you have one) → first line: @AGENTS.md, keep Claude-only notes below
Vendors have started shipping skills too: TypeSafe publishes an official agent skill for its Jev model instead of an MCP server. Every stack rule set on STACK IT FAST already ships in all of these formats: an AGENTS.md, a CLAUDE.md, a Cursor .mdc rule and an installable Agent Skill (SKILL.md), derived from production repositories that use that stack.
5. Methodology
- Sample: the 113 open-source repositories with a published, source-audited deep dive in the STACK IT FAST directory.
- Snapshot: the repository root at the commit each deep dive was audited against (September 2026), read through the GitHub contents API. Nested instruction files inside subdirectories were not counted.
- Pointer detection: a CLAUDE.md of 64 bytes or less that names AGENTS.md (a git symlink or a one-line
@AGENTS.mdimport) counts as a pointer. - Tool behaviour: taken from Cursor’s rules documentation (August 2026), the Claude Code v2.1.277 release coverage (September 2026) and the agents.md compatibility list.