Agent instruction files
Every coding agent loads a project file of standing instructions before it starts work. Here is where each tool looks, which frontmatter it understands and how global, project and nested copies combine, checked against vendor docs on 2026-10-01.
Which tool reads which file
| Tool | Reads | AGENTS.md |
|---|---|---|
| OpenAI Codex | AGENTS.mdAGENTS.override.md~/.codex/AGENTS.md | Native |
| Claude Code | CLAUDE.mdCLAUDE.local.md.claude/rules/*.md~/.claude/CLAUDE.mdAGENTS.md | Native |
| Cursor | .cursor/rules/*.mdcAGENTS.md | Native |
| GitHub Copilot | .github/copilot-instructions.md.github/instructions/*.instructions.mdAGENTS.mdCLAUDE.mdGEMINI.md | Native |
| Gemini CLI | GEMINI.md~/.gemini/GEMINI.md.gemini/settings.json | Via config |
| Devin Desktop (formerly Windsurf) | .devin/rules/*.md.windsurf/rules/*.md.windsurfrules~/.codeium/windsurf/memories/global_rules.mdAGENTS.md | Native |
| Cline | .clinerules/*.md.cline/rules/*.mdAGENTS.md.cursorrules.windsurfrules | Native |
| Aider | .aider.conf.yml | Via config |
| OpenClaw | AGENTS.mdSOUL.mdIDENTITY.mdUSER.mdMEMORY.md | Native |
Keep a single AGENTS.md as the source of truth and point the remaining tools at it. Seven of the nine tools above read it without help; Gemini CLI and Aider need one config line, and a CLAUDE.md that only says @AGENTS.md keeps older Claude Code versions in step. Use each tool's own rule format only for path-scoped rules that AGENTS.md can't express.
All instruction files
AGENTS.mdAGENTS.md
AGENTS.md is a plain Markdown file of project instructions that most coding agents read without extra setup. OpenAI contributed it to the Agentic AI Foundation under the Linux Foundation, and over 60k open-source projects use it.
CLAUDE.mdCLAUDE.md (Claude Code)
CLAUDE.md is the memory file Claude Code loads at launch from your home directory, the project and every parent folder. Path-scoped rules in .claude/rules/ add guidance that loads only when matching files are read.
GEMINI.mdGEMINI.md (Gemini CLI)
GEMINI.md is the context file Gemini CLI sends with every prompt. It can also read AGENTS.md or any other name you set in context.fileName.
.cursor/rules/*.mdcCursor Project Rules (.cursor/rules/*.mdc)
Cursor Project Rules are .mdc files in .cursor/rules/ whose frontmatter decides when each rule is attached. Cursor also reads AGENTS.md, plus User Rules and Team Rules set outside the repository.
.github/copilot-instructions.mdGitHub Copilot custom instructions
GitHub Copilot reads one repository-wide file, .github/copilot-instructions.md, plus path-specific .instructions.md files. It also honours AGENTS.md, or a single root CLAUDE.md or GEMINI.md.
.devin/rules/*.mdDevin Desktop (Windsurf) rules
Devin Desktop, the new name for Windsurf since 2026-06-02, reads rule files from .devin/rules/ and still accepts .windsurf/rules/ and the legacy .windsurfrules. Each rule's trigger decides whether it is always on, matched by glob, chosen by the model or called manually.
.clinerules/Cline Rules (.clinerules/)
Cline Rules are Markdown files in .clinerules/ that Cline combines with global rules and with AGENTS.md. Optional paths frontmatter limits a rule to matching files.
~/.openclaw/workspace/AGENTS.mdOpenClaw workspace bootstrap files
OpenClaw builds each agent's context from Markdown bootstrap files in its workspace, led by a required AGENTS.md. They are injected into the system prompt on the first turn of every new session.