The file your AI reads before your code
AGENTS.md (or CLAUDE.md, or .cursorrules) is the standing instruction set the AI follows on every turn. Most repos skip it entirely or paste a generic template. Seven sections in order of impact.
See Read the postEvery AI tool — Claude Code, Cursor, Windsurf, Cline — reads a special file before it reads your code. It's a plain-text standing instruction set: this is the stack, these are the conventions, these are the things that will break the build.
Most repos either skip it entirely or paste a generic template from GitHub that doesn't know anything about the actual codebase.
The minimum viable version is one line:
This is NOT the [framework] you know. Read the relevant guide in [path] before writing any code.
That alone prevents the majority of "AI confidently uses the wrong API" failures. The post covers the seven sections that earn their keep — in order of how much damage skipping them causes — plus a step-by-step workflow for having Claude draft one without getting 400 lines of filler.
More spotlights: See the archive →