AGENTS.md and CLAUDE.md
Which instructions file each of 17 coding agents reads, and a generator that writes one AGENTS.md plus the small files that make Claude Code and the others read it too.
Updated November 23, 2026
Run in your project folder. It replaces AGENTS.md.
cat > AGENTS.md <<'EOF' # My project ## Commands - Install: `npm install` - Test: `npm test` ## Rules - Keep changes small and run the tests before finishing. EOF # Claude Code reads CLAUDE.md; this adds the line that imports AGENTS.md, once, and keeps the rest grep -qxF '@AGENTS.md' CLAUDE.md 2>/dev/null || printf '\[email protected]\n' >> CLAUDE.md
Most agents read AGENTS.md. Claude Code reads CLAUDE.md first and falls back to AGENTS.md only when there is no CLAUDE.md; Qwen Code reads QWEN.md and AGENTS.md; Antigravity reads AGENTS.md or GEMINI.md. Keeping one AGENTS.md and pointing the others at it means instructions are written once.
| Agent | Reads |
|---|---|
| Claude Code | CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, ~/.claude/CLAUDE.md, .claude/rules/*.md |
| Codex | AGENTS.md, AGENTS.override.md, ~/.codex/AGENTS.md |
| OpenCode | AGENTS.md, ~/.config/opencode/AGENTS.md |
| Antigravity CLI | AGENTS.md, GEMINI.md, .agents/AGENTS.md, .agents/rules/*.md, ~/.gemini/AGENTS.md |
| Grok Build | AGENTS.md, CLAUDE.md, CLAUDE.local.md, .grok/rules/*.md |
| Kimi Code CLI | AGENTS.md, .kimi-code/AGENTS.md, ~/.kimi-code/AGENTS.md, ~/.agents/AGENTS.md |
| Muse Code | AGENTS.md, CLAUDE.md, .agents/AGENTS.md, .claude/CLAUDE.md |
| OpenClaw | AGENTS.md, SOUL.md, IDENTITY.md, USER.md, MEMORY.md |
| Hermes Agent | .hermes.md, HERMES.md, AGENTS.md, CLAUDE.md, .cursorrules |
| Pi | AGENTS.md, AGENTS.override.md, CLAUDE.md, ~/.pi/agent/AGENTS.md |
| Goose | AGENTS.md, .goosehints, ~/.config/goose/.goosehints |
| Qwen Code | QWEN.md, AGENTS.md, ~/.qwen/QWEN.md |
| Mistral Vibe | AGENTS.md, ~/.vibe/AGENTS.md |
| Factory Droid | AGENTS.md, CLAUDE.md, .factory/AGENTS.md, ~/.factory/AGENTS.md |
| Kiro | AGENTS.md, .kiro/steering/*.md, ~/.kiro/steering/*.md |
| Amp | AGENTS.md, ~/.config/amp/AGENTS.md |
| fx | AGENTS.md, ~/.fx/AGENTS.md |