AGENTS.md Was Built to Help Agents. I Use it to Catch Them.

AGENTS.md was built to guide coding agents, but I use it as a lightweight filter for low-effort AI-generated PRs. If an agent follows the repo instructions, it self-discloses in the PR template, gets labeled, and the contributor has to prove they actually ran the code.


This content originally appeared on HackerNoon and was authored by Vladlen Kaveev

As the AI industry keeps growing, so do its side effects. I maintain the react-native-tdlib library, and I noticed pretty quickly that more and more PRs look like raw agent output. At first I played fair — I'd leave questions on every one of them: did you actually test this, what exactly does your change do, why is this line here? At some point I realized I was burning my time going back and forth with people who didn't even know what they'd written.

My first instinct was to write a big README or CONTRIBUTING and say it outright: "I don't accept generated code." But I immediately ran into the obvious problem — how do you prove code was generated? "I can smell the Claude Code on this one" isn't exactly a winning argument in a public PR thread.

The solution turned out to be pretty simple — AGENTS.md. It doesn't prove a PR was generated, but it does a great job of catching the most obvious automated PRs, where the author clearly wasn't involved in the process at all.

What AGENTS.md is and why it exists

AGENTS.md is basically a README, but for agents instead of people. A bit of history: the format was created by OpenAI for their Codex CLI in the summer of 2025, and in late 2025 the standard was handed over to the Linux Foundation for vendor-neutral governance. As of writing, tens of thousands of open-source projects use it, and just about every major tool reads it: Codex, Claude Code, Cursor, Copilot, Gemini CLI, and the rest. The point is that it's one file for every agent — no need to maintain a separate one for each.

The key detail for our case: an agent reads AGENTS.md before it even starts planning changes. So whatever tool someone points at your repo swallows your instructions first, and only then goes digging into the code.

A normal, "honest" AGENTS.md looks something like this:

# AGENTS.md

## Dev environment
- Package manager: yarn
- Build: yarn build
- Test: yarn test
- Lint: yarn lint

## Conventions
- TypeScript strict mode, no `any`
- Only touch native modules with explicit justification in the PR description

Useful on its own — the agent doesn't have to dig deep into context to understand the project's basic rules. But since the agent is guaranteed to read this file, why not put a little something extra in there?

The "maybe automated" label

I stopped trying to catch the agent and started asking it to introduce itself. The idea: you don't need to detect generated code — you just need to ask it to disclose that it was used, in the very file the agent reads first.

It works in three steps.

Step 1. Self-disclosure via AGENTS.md. This simple file contains a direct instruction: if a PR is made entirely by an AI agent, it should tick a box in the PR template. In the template itself, that box looks roughly like this:

## Disclosure
- [ ] This PR was written with meaningful AI agent assistance (see AGENTS.md)

The trick is that an agent reading AGENTS.md honestly ticks that box, while a human who wrote the code by hand leaves it empty. So the checkbox alone does a decent job of splitting the streams — and there's nothing to "prove."

Step 2. A bot adds a label and starts a timer. From there a plain GitHub Action kicks in. When it sees the box checked, it slaps a maybe automated label on the PR, posts a comment, and starts a countdown: the PR auto-closes in 3 days unless you confirm authorship.

Step 3. A check you can't generate. In that same comment, the bot asks for more than your word — it wants logs from actually running the changed method in the example/ app against a live TDLib session, separately on iOS and Android.

This is the crucial part for my library specifically. react-native-tdlib is a native bridge (ios/, android/), and a generated PR usually "passes the tests" precisely because the tests don't touch anything native. But device logs from a real run on both platforms? For those you have to build the example, spin up a TDLib session, and actually exercise the methods.

A real example

Take this PR. The agent did exactly what AGENTS.md told it to. Which means the human probably never really engaged with the process — otherwise they'd have noticed the checkbox. The bot immediately added maybe automated and asked for device logs from both platforms. And the most telling part was how the author reacted: the moment the PR got labeled, they closed it themselves — apparently realizing they'd been caught. That's how I saved myself the code review and the pointless back-and-forth.

Wrapping up

AGENTS.md was meant to make agents more useful, but for me it ended up being an easy way to spot an agent. The irony: a file for agents turns out to be the best tool for catching the people hiding behind them.

The more autonomous AI gets by the day, the more people use it for shady purposes. Spray PRs across other people's repos, pad a GitHub profile, build a fake reputation — and maybe, down the line, land a job based on "open-source contributions" that never really happened. I don't mind that people use agents — I lean on them heavily myself. What bothers me is when there's no human behind the commit who understands what's in it and is willing to own it. AGENTS.md doesn't fix any of that, but at least it enforces one simple rule: if you want your contribution to count, show me you ran your own code.


This content originally appeared on HackerNoon and was authored by Vladlen Kaveev


Print Share Comment Cite Upload Translate Updates
APA

Vladlen Kaveev | Sciencx (2026-05-25T01:04:52+00:00) AGENTS.md Was Built to Help Agents. I Use it to Catch Them.. Retrieved from https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/

MLA
" » AGENTS.md Was Built to Help Agents. I Use it to Catch Them.." Vladlen Kaveev | Sciencx - Monday May 25, 2026, https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/
HARVARD
Vladlen Kaveev | Sciencx Monday May 25, 2026 » AGENTS.md Was Built to Help Agents. I Use it to Catch Them.., viewed ,<https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/>
VANCOUVER
Vladlen Kaveev | Sciencx - » AGENTS.md Was Built to Help Agents. I Use it to Catch Them.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/
CHICAGO
" » AGENTS.md Was Built to Help Agents. I Use it to Catch Them.." Vladlen Kaveev | Sciencx - Accessed . https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/
IEEE
" » AGENTS.md Was Built to Help Agents. I Use it to Catch Them.." Vladlen Kaveev | Sciencx [Online]. Available: https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/. [Accessed: ]
rf:citation
» AGENTS.md Was Built to Help Agents. I Use it to Catch Them. | Vladlen Kaveev | Sciencx | https://www.scien.cx/2026/05/25/agents-md-was-built-to-help-agents-i-use-it-to-catch-them/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.