Write the shared rules once, in AGENTS.md, and make every tool load that one file. Copilot and Cursor read AGENTS.md without help. Gemini CLI needs one setting. By default, Claude Code reads AGENTS.md by itself only when it finds no CLAUDE.md, so once a CLAUDE.md exists, it has to bring AGENTS.md in: with a line @AGENTS.md, or by being a symlink to it. A sentence such as "see AGENTS.md" loads nothing. A second copy of the rules loads, and from then on somebody has to keep the two in step by hand.
Claude Code is the tool I would check first. On 17 November 2026 I went through the rules files in the 1,000 most-starred GitHub repositories with a push after 17 August. 197 of them have both AGENTS.md and CLAUDE.md. In 51 of those, CLAUDE.md has its own text and no import, so by default Claude Code starts every session there without AGENTS.md.
I recommend one file for the shared rules, read by every tool through a mechanism that tool documents, and no copies, identical ones included. Where a tool offers both an import and a symlink, I take the import.
Here is how I counted. The GitHub search API matched 7,823 public repositories with more than 5,000 stars and a push after 17 August 2026, and I took the first 1,000 by stars. In each I read the root folder, .github/ and .cursor/rules/, and collected the rules files for AI coding tools. All 1,000 were read without an error. Files in deeper folders, such as docs/AGENTS.md, were not read, so the counts of files are a lower bound. For the line counts, an instruction line is a line of four words or more outside code blocks, headings and tables. Lines are compared after lower-casing and removing list markers and markdown symbols.
478 of the 1,000 repositories keep rules for at least one AI coding tool.
| File | Repositories |
|---|---|
| AGENTS.md | 408 |
| CLAUDE.md | 237 |
Copilot instructions ( .github/copilot-instructions.md ,.github/instructions/ ) |
94 |
Cursor rules ( .cursor/rules/ ,.cursorrules ) |
31 |
| GEMINI.md | 18 |
.windsurfrules |
2 |
AGENTS.md is far ahead of the rest, and it is the file I would make the source. Its site calls it "A simple, open format for guiding coding agents".
244 repositories keep rules for two tools or more, and 3 of them for five. Where two tools' files carry the same text, GitHub's contents API does not say whether they are two files or one: it lists a symlink to a regular file as an ordinary file and returns the target's text. So on 20 November I also read the git file modes of every such pair.
Claude Code now reads AGENTS.md on its own. Its memory documentation says: "Claude Code can read AGENTS.md as your project instructions, so a repository already set up for other coding agents works without adding a CLAUDE.md, an import, or a setting." The page adds that this "requires Claude Code v2.1.277 or later".
The same page has a table of what Claude reads by default in each case. For "An AGENTS.md and a CLAUDE.md or CLAUDE.local.md in your working directory or above it", the answer is "Your CLAUDE.md files only". The rule assumes that a project with a CLAUDE.md has already told Claude what to read. The side effect is that adding a CLAUDE.md to a repository that already has AGENTS.md takes AGENTS.md away from Claude, unless CLAUDE.md imports it or is a symlink to it. The page gives the import syntax: "CLAUDE.md files can import additional files using @path/to/import syntax."
A setting, Project instructions, can make Claude read both files, but Claude Code "ignores it in project and local settings files". A repository cannot switch it on for the people who clone it.
In 82 of the 197 repositories CLAUDE.md imports AGENTS.md. In 61 the two names lead to one file through a symlink. Only 2 keep CLAUDE.md as a separate identical copy. In 1 more the two files were identical on 17 November, and CLAUDE.md has been deleted since. All of these work, with a Windows exception for symlinks. The other 51 have a CLAUDE.md with its own text and no import. 28 of them mention AGENTS.md, and 23 do not mention it at all. AGENTS.md in those 51 repositories holds 3,424 instruction lines, and 3,234 of them, 94.5 percent, do not appear in CLAUDE.md. In 40 of the 51, at least nine tenths of the AGENTS.md lines are missing from what Claude loads.
15 of the 28 CLAUDE.md files are one short sentence pointing to AGENTS.md. The memory page covers that case: "Claude sees AGENTS.md only if it decides to open the file." I do not want project rules to depend on that decision.
GitHub Copilot takes AGENTS.md as agent instructions, next to its own instructions files. A repository can hold several AGENTS.md files, and GitHub's instructions page says which one wins: "When Copilot is working, the nearest AGENTS.md file in the directory tree will take precedence."
Cursor treats AGENTS.md as plain markdown and keeps a format of its own for scoped rules. Its rules page is strict here: "Project rules must use the .mdc extension." Three repositories in the sample keep plain .md files in .cursor/rules/, at least 23 between them. They sit in the rules folder, and the rules system does not apply them.
By default Gemini CLI looks for GEMINI.md. The GEMINI.md page names the setting that changes this: "To specify a different name or a list of names, use the context.fileName property." With AGENTS.md in that list, Gemini reads the shared file too.
Separate identical copies are rare in the sample. On 17 November, 81 pairs of rules files for different tools had identical text. In 77 of them the two names lead to one file through a symlink. Only 3 are two separate files with the same text, and the last one can no longer be checked, because one of its files has been deleted since. Those 3 work as long as both files stay equal. Every later change has to be made in both, by someone who remembers that there are two.
27 pairs of separate files share some of their lines without being equal. They have a median of 15 lines in common, and in 10 of them one side has five or more lines that the other lacks. My probe sees a single day and no history, so it cannot say how these pairs got there or which differences were meant. Whoever edits one of those files next has to work out which lines belong in which file.
Most of the identical pairs turned out to be symlinks, and the Claude Code memory page offers one, ln -s AGENTS.md CLAUDE.md, for a project with no Claude-specific content. It keeps one file, which is already better than a copy. One of the constraints the page lists for it concerns Windows: "Git checks a committed symlink out as a plain text file unless core.symlinks is enabled, which leaves that clone with a one-line CLAUDE.md in place of your instructions." On such a clone Claude starts without the rules, as in the 51 repositories above. For a repository that anyone clones on Windows, the page says to use the import.
A symlink also hands two tools exactly the same text, so a rule meant for one of them alone has nowhere to go. An import keeps one file and still leaves room for such a rule, and so does the Gemini setting.
Everything shared goes into AGENTS.md. CLAUDE.md gets the import and, under it, only what is specific to Claude Code:
<!-- CLAUDE.md -->
@AGENTS.md
## Claude Code only
- Use the project's test script, not the global one.
Gemini CLI gets one setting, in .gemini/settings.json at the project root:
{ "context": { "fileName": ["AGENTS.md", "GEMINI.md"] } }
GEMINI.md stays in the list for lines that only Gemini should read, the same job the lines under the import do in CLAUDE.md.
Copilot and Cursor need no extra file for the shared rules. Their own files, .github/copilot-instructions.md and .cursor/rules/*.mdc, stay for what belongs to one tool or one folder, with nothing repeated from AGENTS.md.
Three checks cover a repository you already have. If it has a CLAUDE.md that is neither a symlink to AGENTS.md nor a copy of it, look for the @AGENTS.md line; without it, Claude reads CLAUDE.md only. In a repository with AGENTS.md alone, start an interactive Claude Code session. The documentation says the conversation then shows a line such as "no CLAUDE.md found; AGENTS.md loaded". If that line does not appear, AGENTS.md was not loaded. For Cursor, list .cursor/rules/. A file there without the .mdc extension is not a project rule.
I read the repositories through the GitHub API on 17 November 2026, between 20:39 and 21:21 UTC, and the git file modes on 20 November. All documentation quoted here was checked against the live pages on 20 November. The article describes the repositories and the pages on those dates.
I work on Mnemoverse; none of the tools above is ours, and the counts come from my own scripts over public repositories.