DEV Community

Cover image for We checked the AGENTS.md files of 25 famous repos. Our own linter got a third of its fails wrong.
Manpreet Singh
Manpreet Singh

Posted on Edited on Originally published at singhlabs.dev AI-assisted

We checked the AGENTS.md files of 25 famous repos. Our own linter got a third of its fails wrong.

Short answer: AGENTS.md is the Markdown file in a repo that tells AI coding agents how to work on it. On 16 October, 212 of GitHub's 600 most-starred repos had one in the root. I read 25 of the best-known and ran our linter on each. None tells an agent to do anything dangerous. Seven are over 3,000 tokens, re-sent on every turn. Ten forbid the agent to act on GitHub alone. And our linter failed 18 of them, five wrongly. We fixed that the same day.

Search "AGENTS.md examples" and you get advice: keep it short, put the commands first, say what not to do. Good advice. I wanted to see what the projects everyone copies from actually wrote.

AGENTS.md is quietly becoming the AI contribution policy. Ten of 25 tell the agent not to push, open PRs or comment without a person.

How many repos have one: 212 of 600

I took GitHub's 600 most-starred repositories (the smallest has 45,779 stars) and checked each root folder:

  • 212 have an AGENTS.md. That's 35%.

  • 132 have a CLAUDE.md, and 107 of those have both.

  • Only 25 have a CLAUDE.md and no AGENTS.md.

The 600 include awesome-lists, books and courses, which I didn't separate out. Then I picked 25 well-known ones across JavaScript, Python, Go, Rust, Java, Ruby and C++. A hand pick, not a random sample: I wanted files people actually copy.

The 25, side by side

Sorted by size. "Est. tokens" is our linter's estimate (characters ÷ 4), sent again on every turn of a session. "Setup" and "Test" mean a concrete command, read by hand.

Repo Words Est. tokens Setup Test bridle (old) Fair? 1.2.0
vercel/next.js 4,309 7,658 yes yes FAIL yes FAIL
astral-sh/ruff 2,926 5,098 no yes FAIL yes FAIL
langchain-ai/langchain 2,743 5,088 yes yes FAIL yes FAIL
elastic/elasticsearch 2,110 4,151 partial yes FAIL yes FAIL
pytorch/pytorch 2,407 4,007 yes partial FAIL yes FAIL
rust-lang/rust 1,855 3,357 no partial FAIL yes FAIL
zed-industries/zed 1,888 3,114 no no FAIL yes FAIL
ggml-org/llama.cpp 1,739 2,892 no no FAIL no PASS
caddyserver/caddy 1,259 2,358 no yes PASS yes PASS
microsoft/playwright 1,248 2,185 no yes PASS yes PASS
rails/rails 847 1,726 no yes PASS yes PASS
cli/cli 744 1,443 partial yes PASS yes PASS
spring-projects/spring-framework 598 1,066 yes yes FAIL no PASS
astral-sh/uv 520 876 no no PASS yes PASS
huggingface/transformers 476 816 no yes PASS yes PASS
nodejs/node 423 771 no no FAIL no PASS
pandas-dev/pandas 303 679 partial no FAIL yes FAIL
angular/angular 275 513 partial yes FAIL no PASS
kubernetes/kubernetes 259 471 no yes FAIL yes FAIL
gohugoio/hugo 266 429 no yes PASS yes PASS
scikit-learn/scikit-learn 199 329 no no FAIL no PASS
python/cpython 90 151 no no FAIL borderline PASS
sveltejs/svelte 77 148 no no FAIL yes FAIL
ollama/ollama 56 90 partial no FAIL yes FAIL
microsoft/vscode 33 68 no no FAIL yes FAIL

The data: the 25 files, with the commit each was read at, and all 600 repos in the census (CSV). Reuse it freely under CC BY 4.0: just link this post.

The biggest: Next.js, about 7,700 tokens a turn

Here's our linter, bridle, on the largest one:

$ node bridle.mjs agents vercel__next.js.AGENTS.md
Linting vercel__next.js.AGENTS.md

  ✔ 15 runnable command block(s)
  ✔ how to install / set up
  ✔ how to run the tests
  ✔ how to build or run it
  ! 15 angle-bracket field(s), e.g. <task> — check these are argument syntax, not unfilled template text
  ✔ nothing in here tells the agent to do something dangerous
  ✔ 29 prohibition(s) — the agent knows where the edges are
  ✘ size: 4309 words ≈ 7658 tokens, re-sent every turn — over 3k tokens per turn is a real cost, cut it

FAIL — 1 problem(s). Your agent is reading this file on every run.
Enter fullscreen mode Exit fullscreen mode

It's a good file. It does everything right except stay short. If a session ran 100 turns (my assumption, not a measurement), the file alone would fill 765,800 tokens of context. Caching makes that cheaper, not smaller, so I won't turn it into dollars. What a line costs is priced here.

The middle of the 25 is about 1,070 tokens. Eleven are over 1,500 and seven are over 3,000: Next.js, Ruff, LangChain, Elasticsearch, PyTorch, Rust and Zed.

What's actually in them

  • Conduct, more than build. Node, CPython, scikit-learn and pandas are mostly rules for AI contributions and say little about building or testing.

  • Little on setup. Only 4 of 25 give a concrete setup command: LangChain, Next.js, PyTorch and Spring. Thirteen give a concrete test command. Many leave both to CONTRIBUTING.md.

  • The agent may not act alone. Ten forbid pushing, opening PRs or issues, or commenting without a human: Node, pandas, PyTorch, llama.cpp, Caddy, GitHub CLI, Rust, Transformers, Playwright and Next.js.

  • They disagree on credit. Kubernetes, Playwright, Elasticsearch and Next.js ban AI co-author trailers. Node and llama.cpp require an Assisted-by: line. One global agent setting can't satisfy both. We compared eleven AI policies and found the same split.

  • Two are pointers. VS Code's is 33 words and Svelte's 77, mostly links elsewhere. An agent that doesn't follow the link gets almost nothing.

Nothing dangerous, in any of them. No sudo, no curl | sh, no rm -rf, no --no-verify, no force push, no write to your home folder. I re-ran the check with its "this line forbids it" filter switched off: still zero. The only writes outside the repo are to /tmp in Next.js and Ruff, both scratch space with a stated reason.

And CLAUDE.md has become a pointer. Seven of the 25 also have one. None has its own content: three are the same file under two names, two are a one-line @AGENTS.md import, and two just say "see AGENTS.md". Which is the setup we recommended.

Five lines worth copying

  • Zed sets a bar for adding any rule: "Rules should be traps to avoid, not maps to follow." Anything the agent can learn by reading the code stays out.

  • Kubernetes pairs its "don't" with the command to run instead: don't hand-edit generated files, run the update target.

  • GitHub CLI names the one command with side effects: its acceptance tests create real resources, so they need an authorised test host.

  • Playwright defines consent in words a model can check: it may push only when the user's message contains specific trigger words.

  • llama.cpp corrects the model's stale memory: a library it may "remember" isn't used here.

Our linter got a third of its fails wrong

bridle failed 18 of the 25. I read every one. Twelve fails were fair: the seven oversized files, plus VS Code, Ollama, Kubernetes, Svelte and pandas for missing steps or thin pointers. Five were wrong, and one was borderline. Node is the clearest:

$ node bridle.mjs agents nodejs__node.AGENTS.md
Linting nodejs__node.AGENTS.md

  · no command blocks — reading this as a policy file, not a project file
  ✘ few imperative rules — an agent cannot act on description alone
  ! 4 angle-bracket field(s), e.g. <agent name> — check these are argument syntax, not unfilled template text
  ✔ nothing in here tells the agent to do something dangerous
  ! only 2 prohibition(s) — nothing here says what the agent must never touch
  ✔ size: 423 words ≈ 771 tokens, re-sent every turn

FAIL — 1 problem(s). Your agent is reading this file on every run.
Enter fullscreen mode Exit fullscreen mode

Node's file has a section headed "AI agents must not:" with eight items under it. bridle counted two. Its rules only saw lines that start with one of nine verbs, so it missed indented bullets (Angular), rules mid-sentence (scikit-learn), a terse list (Spring), and a list under a "must not" heading (Node). And llama.cpp's conduct policy was read as a project file because one example block was labelled sh.

Fixed the same day: bridle 1.2.0. It now ignores the label on a code block, reads indented and mid-line rules, treats two to four rules as a warning instead of a fail, follows a CLAUDE.md that imports AGENTS.md, and fails a pointer file under 80 words. Re-run on the same 25: 13 pass, 12 fail. All five false fails now pass, CPython passes with a warning, and the twelve fair fails still fail. Node now reads:

$ node bridle.mjs agents nodejs__node.AGENTS.md
Linting nodejs__node.AGENTS.md

  · no command blocks — reading this as a policy file, not a project file
  ! only 3 imperative rule(s) — an agent cannot act on description alone
  ! 4 angle-bracket field(s), e.g. <agent name> — check these are argument syntax, not unfilled template text
  ✔ nothing in here tells the agent to do something dangerous
  ! only 2 prohibition(s) — nothing here says what the agent must never touch
  ✔ size: 423 words ≈ 771 tokens, re-sent every turn

PASS — an agent can act on this.
Enter fullscreen mode Exit fullscreen mode

Better, not right. It still counts three rules and two prohibitions where a person counts eight. It passes because a short count is now a warning, not because the counting improved. The browser checker runs the same 1.2.0 rules.

Check yours

Paste your file into the CLAUDE.md checker, which runs the same checks in your browser and sends nothing anywhere. Or in a terminal:

npx github:manpreet171/bridle agents AGENTS.md
Enter fullscreen mode Exit fullscreen mode

Read a ✘ as a question, not a verdict. After this week, that's not a disclaimer. It's a measurement.


Sources: the census used GitHub's search API (stars:>15000, sorted by stars, the first 600) and each repo's root listing, on 16 Oct 2026 at 07:06 UTC. The 25 were picked by hand for name recognition and spread, not at random. Each file was downloaded at the last commit that changed it; three AGENTS.md files are symlinks (Transformers, PyTorch, Zed) and were read at their target. Token figures are bridle's estimate of characters ÷ 4, not a tokenizer count. "Setup", "Test", the GitHub-conduct count and every fail verdict are my reading of each file. The terminal blocks are real bridle runs, the first two on commit 93b302a and the last on 1.2.0 (commit d439619, the same day), with the file path shortened. Only root files were measured; several repos keep more in subfolders.

Where this fits: memory and context, layer 2 of the Agent Ops Stack.

Read next: How long should CLAUDE.md be? I priced every line. · AGENTS.md vs CLAUDE.md: Claude Code reads both now, just not at once.


Originally published at singhlabs.dev.

Top comments (0)