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.

AgentReads
Claude CodeCLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, ~/.claude/CLAUDE.md, .claude/rules/*.md
CodexAGENTS.md, AGENTS.override.md, ~/.codex/AGENTS.md
OpenCodeAGENTS.md, ~/.config/opencode/AGENTS.md
Antigravity CLIAGENTS.md, GEMINI.md, .agents/AGENTS.md, .agents/rules/*.md, ~/.gemini/AGENTS.md
Grok BuildAGENTS.md, CLAUDE.md, CLAUDE.local.md, .grok/rules/*.md
Kimi Code CLIAGENTS.md, .kimi-code/AGENTS.md, ~/.kimi-code/AGENTS.md, ~/.agents/AGENTS.md
Muse CodeAGENTS.md, CLAUDE.md, .agents/AGENTS.md, .claude/CLAUDE.md
OpenClawAGENTS.md, SOUL.md, IDENTITY.md, USER.md, MEMORY.md
Hermes Agent.hermes.md, HERMES.md, AGENTS.md, CLAUDE.md, .cursorrules
PiAGENTS.md, AGENTS.override.md, CLAUDE.md, ~/.pi/agent/AGENTS.md
GooseAGENTS.md, .goosehints, ~/.config/goose/.goosehints
Qwen CodeQWEN.md, AGENTS.md, ~/.qwen/QWEN.md
Mistral VibeAGENTS.md, ~/.vibe/AGENTS.md
Factory DroidAGENTS.md, CLAUDE.md, .factory/AGENTS.md, ~/.factory/AGENTS.md
KiroAGENTS.md, .kiro/steering/*.md, ~/.kiro/steering/*.md
AmpAGENTS.md, ~/.config/amp/AGENTS.md
fxAGENTS.md, ~/.fx/AGENTS.md