AGENTS.md template
This AGENTS.md template is a skeleton. The brackets are prompts, not rules. Delete each bracket and write the fact for your repo. Finished files for a frontend app, a data job, and a library are on the AGENTS.md example page. Those are for reading a complete file. This page is for copying a blank one.
# AGENTS.md
## Project overview
[One or two sentences: what this repo builds, the language, and what it does not include.]
## Coding conventions
[Language level, naming, and formatter. Name the linter if you require it.]
## Architecture constraints
[The boundaries: one process or many, whether a database or a network call is allowed.]
## Do
- [A checkable action, starting with a verb.]
## Don't
- [A forbidden action. "Do not …"]
## File and folder scope
[Directories the agent may edit. Directories it must leave alone.]
## PR and commit expectations
[What the commit message or the pull request must name.]
## Testing
[The command.]
[One result that command must produce: a count, a case name, or a failing build.]
How to fill the AGENTS.md template
Work from the top. The overview is one or two sentences. If it needs a paragraph of history, that history belongs in the README, not here. Conventions name a tool you already use, such as a formatter or a linter. If you do not require one, delete the sentence instead of writing “use good style.”
Architecture is a boundary. “No database” and “no network” are boundaries. “Keep it simple” is not, because two people will not draw the same line. Do and don't are lists. One item per line. If a don't restates a do, keep the don't only when it names a specific mistake, such as dropping a bad row instead of writing it out.
Scope names directories. “Edit src/ and test/. Do not edit vendor/.” is usable. “Edit the relevant files” is not, because the agent decides what relevant means. The pull-request line names the thing a reviewer looks for: the route, the column, or the function. Testing is two lines. The first is the command. The second is a result. A template that stops at the command leaves the agent with a green run that might be the wrong green run.
Leave a section out when you have nothing
The generator writes “Not specified in the source” for a heading your paste never mentioned. That sentence is a marker for a machine conversion. In this template, delete the heading instead. An empty don't section that still says “[A forbidden action]” will be copied into the repo if you forget it. Read the file once and confirm no brackets remain.
Put the filled file at the repository root as AGENTS.md. The AGENTS.md file page says how that differs from a README and from a .cursorrules file. If the notes already exist as bullets, you can paste them into the agents.md generator and sort them into these headings instead of filling the brackets by hand.
This skeleton is not a CLAUDE.md
CLAUDE.md on this site has five headings: role, goals, constraints, tools and permissions, and style. Filling this AGENTS.md template and saving it as CLAUDE.md keeps the eight headings. The difference is on the AGENTS.md vs CLAUDE.md page. Use the Claude tool when the reader is Claude Code.
Questions
Is this AGENTS.md template a finished file?
No. Every bracket is a prompt. Replace it with a fact from your repo, or delete the heading.
Where are finished examples?
The AGENTS.md example page has three complete files: a Next.js site, a Python job, and a TypeScript package.
What if I leave a bracket in?
The agent will treat the bracket text as an instruction. Read the file and remove every bracket before you commit it.
Can I use this skeleton as CLAUDE.md?
No. CLAUDE.md uses five different headings. Generate that file from the CLAUDE.md page.