C:\>DOS to AI

C:\blog> more agentsmd.txt

What is AGENTS.md? One instructions file that most AI coding tools read

4 min readby Ian Willis

I’m Ian, tech-obsessed since I was eight. Let’s get you up to speed, fast.

This is episode 4 of Claude Basics, and it’s the one where what you learned about Claude carries over to every other tool. In the last post I showed you CLAUDE.md, the notes file Claude Code reads at the start of every session. It turns out most of the other AI coding tools have the same idea, and they’ve mostly agreed on one file name for it: AGENTS.md.

A code editor with AGENTS.md open, and four tool icons pointing at the file: most AI coding tools read it.

What it is

AGENTS.md is, in the words of the people who publish it, “a simple, open format for guiding coding agents”. It’s a plain Markdown file, Markdown being plain text with a few simple marks, like # for a heading and - for a bullet point, and it sits at the root of your project, with no required fields and no special syntax: a heading and some bullet points about what the project is, how you like things done, and what to check before doing it. It started as a collaboration between OpenAI Codex, Amp, Google’s Jules, Cursor and Factory, and it’s now looked after by the Agentic AI Foundation, part of the Linux Foundation, so no one company owns it.

Think of it like one note on the fridge that everyone in the house reads, instead of a separate note for each person.

Here’s Owen’s file from the What is CLAUDE.md?, saved under the new name. Not a word changed:

# Owen
Role: writer. Scripts, hooks and words.
- Short sentences, plain words.
- Ask before deleting anything.
- Report: done, not done, what you need.

Who reads it

A computer screen with one document in the middle and four smaller tool windows, each linked to it by a line.

This is the useful part, so here it is as a table. Checked against each tool’s own documentation in October 2026; these tools change fast, so the links at the bottom are the ones to trust.

ToolReadsNotes
OpenAI CodexAGENTS.mdReads it before doing any work. Also a global one in ~/.codex.
CursorAGENTS.mdIn the project root and subfolders. Also its own Project Rules in .cursor/rules.
GitHub Copilot (coding agent)AGENTS.mdThe nearest one in the folder tree wins. Also .github/copilot-instructions.md, or a CLAUDE.md or GEMINI.md at the root.
Claude CodeCLAUDE.md, or AGENTS.mdReads AGENTS.md when there’s no CLAUDE.md in the folder or above it (version 2.1.277 and later). With both, only CLAUDE.md, unless CLAUDE.md contains the line @AGENTS.md.
Gemini CLIGEMINI.md, or AGENTS.mdGEMINI.md by default. Add AGENTS.md to context.fileName in settings.json and it reads that too.
Jules, Zed, Warp, Devin, Windsurf, Aider and moreAGENTS.mdagents.md lists more than twenty tools.
ChatGPT (the chat app)No fileA Project’s instructions box does the job.

Where it goes

Put one AGENTS.md at the top of the project. If you have a big repository with several sub-projects inside it, each one can have its own AGENTS.md, and the rule is simple: the closest file to the code being edited wins. Whatever you type in the chat beats both.

Which one should I write?

If you only use Claude Code, write CLAUDE.md and you’re done. If you use Claude Code and anything else on the same project, write AGENTS.md so every tool reads it, then make a CLAUDE.md with one line in it, @AGENTS.md, so Claude Code reads the shared file plus anything Claude-specific you add below that line. That way there’s one set of rules and nobody on the project is working from a different note.

What to remember

  • AGENTS.md is the shared instructions file. Open, plain Markdown, no special fields.
  • Most coding tools read it: Codex, Cursor, Copilot, Jules, Gemini CLI and more.
  • Claude Code reads it too when there’s no CLAUDE.md, and both when CLAUDE.md says @AGENTS.md.
  • Root of the project, and in big repos the closest file wins.

The short video for this one is on YouTube at @DOS_to_AI (coming soon).

Hope you found this helpful. You’ll find more free prompts and articles on dos2ai.com.

Written in October 2026, and checked with Claude Code 2.1.316 on 1 November 2026. These tools change fast, so check the source: agents.md, Claude Code Docs, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI.

Not affiliated with or endorsed by Anthropic, OpenAI, Cursor, GitHub or Google. I’m an independent user.

Want the next one by email? Sign up for free lessons.