AGENTS.md Generator

Generator / Guides / What is AGENTS.md?

What is AGENTS.md?

AGENTS.md is a Markdown file that gives AI coding agents the context a human teammate would need: how to install, build and test the project, what style to follow and what to avoid.

Where it goes

Put AGENTS.md in the repository root. In a monorepo you can add more files in subfolders. Most tools prefer the file closest to the code being edited, and some, such as Claude Code, load files from the root down and pick up a subfolder file when they work in that folder.

There is no required structure. The file is a README for agents: plain headings and bullet points.

What to include

Commands first: install, dev server, build, test and lint. Agents act on exact commands more reliably than on prose.

Then the rules that are not obvious from the code: naming and formatting choices, testing expectations, git and pull request conventions, security boundaries and things the agent must never touch.

Leave out anything the code or the README already makes clear, and never put secrets in the file.

Keep it short and specific

Anthropic advises keeping instruction files under about 200 lines, using concrete wording such as "Use 2-space indentation" instead of "Format code properly", and removing contradictory rules, because an agent may follow either one.

The AGENTS.md generator helps with this: every rule is one line, and the preview shows a line and token count.

A minimal example

A good first version has three parts: a Commands list, a short list of conventions and a few boundaries.

Use the generator to start from a preset for your stack, then delete anything that does not apply to your project.

Generate your AGENTS.md

More guides