dotsagent.io
Language:English
Instruct · reference

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

ToolReadsAGENTS.md
OpenAI CodexAGENTS.mdAGENTS.override.md~/.codex/AGENTS.mdNative
Claude CodeCLAUDE.mdCLAUDE.local.md.claude/rules/*.md~/.claude/CLAUDE.mdAGENTS.mdNative
Cursor.cursor/rules/*.mdcAGENTS.mdNative
GitHub Copilot.github/copilot-instructions.md.github/instructions/*.instructions.mdAGENTS.mdCLAUDE.mdGEMINI.mdNative
Gemini CLIGEMINI.md~/.gemini/GEMINI.md.gemini/settings.jsonVia config
Devin Desktop (formerly Windsurf).devin/rules/*.md.windsurf/rules/*.md.windsurfrules~/.codeium/windsurf/memories/global_rules.mdAGENTS.mdNative
Cline.clinerules/*.md.cline/rules/*.mdAGENTS.md.cursorrules.windsurfrulesNative
Aider.aider.conf.ymlVia config
OpenClawAGENTS.mdSOUL.mdIDENTITY.mdUSER.mdMEMORY.mdNative

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.md

AGENTS.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.md

CLAUDE.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.md

GEMINI.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/*.mdc

Cursor 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.md

GitHub 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/*.md

Devin 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.md

OpenClaw 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.

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026