Which files does each AI coding agent read?
Most agents read AGENTS.md: Cursor, Devin, Codex, Kimi Code CLI, OpenHands, and Pi. Claude Code reads CLAUDE.md and falls back to AGENTS.md. Gemini CLI and Aider read their own files, and AGENTS.md only when configured to.
Which files does each agent read?
| Agent | Reads from the repo | Notes |
|---|---|---|
| Claude Code |
| Reads AGENTS.md only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md is found (v2.1.277 and later). A CLAUDE.md that starts with @AGENTS.md loads both, as does a setting. code.claude.com/memory code.claude.com/skills |
| Cursor |
| Project rules live in .cursor/rules/, subfolders included, and in a .cursor/rules/ in any subdirectory; a plain .md there is ignored. The CLI also reads a root CLAUDE.md. Its current docs no longer mention .cursorrules. cursor.com/rules cursor.com/skills cursor.com/using cursor.com/changelog |
| Devin |
| Looks for AGENTS.md before it starts coding and includes its first 16 KiB. Pulls CLAUDE.md and Cursor rule files into its Knowledge. Setup comes from its environment snapshot, which .devin/blueprint.yaml can define. docs.devin.ai/environment docs.devin.ai/knowledge-onboarding docs.devin.ai/skills docs.devin.ai/agents-md docs.devin.ai/git-backed-blueprints |
| Codex |
| Reads AGENTS.md before any work, one per directory from the repo root down to the working directory, up to 32 KiB combined; AGENTS.override.md replaces the AGENTS.md beside it. learn.chatgpt.com/agents-md learn.chatgpt.com/build-skills |
| Kimi Code CLI |
| /init writes an AGENTS.md. Its docs name no CLAUDE.md fallback. github.com/agents.md github.com/slash-commands.md github.com/skills.md |
| Gemini CLI |
| Reads GEMINI.md from the global file, the workspace and its parent directories, and one per subdirectory once a tool reaches it. AGENTS.md loads once it is listed in the context.fileName setting. geminicli.com/gemini-md geminicli.com/skills |
| Aider |
| Reads AGENTS.md or CONVENTIONS.md only when .aider.conf.yml lists it under read:. It does not look for .aider.conf.yaml. aider.chat/lint-test.html aider.chat/aider_conf.html |
| OpenHands |
| Runs .openhands/setup.sh when it starts work on a repo. Treats CLAUDE.md and GEMINI.md as model-specific context, for Claude and Gemini models. docs.openhands.dev/repository docs.openhands.dev/skills docs.openhands.dev/overview |
| Pi |
| Loads the first of AGENTS.override.md, AGENTS.md and CLAUDE.md from the working directory and every directory above it, so an empty AGENTS.md hides a CLAUDE.md beside it. github.com/configuration.md github.com/skills.md |
How do I write one file every agent reads?
- Write it in
AGENTS.mdat the repo root. What to put in it. - If you keep a CLAUDE.md, start it with
@AGENTS.md, or Claude Code skips AGENTS.md. AGENTS.md vs CLAUDE.md. - Aider: list AGENTS.md under
read:in.aider.conf.yml. Gemini CLI: add it tocontext.fileName, or keep a GEMINI.md. - Cursor rules go in
.cursor/rules/, OpenHands setup in.openhands/setup.sh. - Longer task steps go in
.agents/skills/, which every agent here but Claude Code and Aider loads when a task matches. Agent skills.
How many repos have each file?
AGENTS.md202 of 401 (50%).agents/skills69 of 401 (17%).cursor/rules or .cursorrules20 of 401 (5%)CLAUDE.md17 of 401 (4%)GEMINI.md8 of 401 (2%).openhands/setup.sh2 of 401 (0.5%).aider.conf.yml1 of 401 (0.2%)
A repo with both files counts under AGENTS.md unless it is empty; empty files don't count. Read the files.
Agent names link to their boards. The methodology has every weight.