AGENTS.md · Next.js

AGENTS.md and CLAUDE.md examples for Next.js

Of 355 actively developed open-source products built with Next.js, 217 (61%) keep instruction files for coding agents: AGENTS.md in 167, CLAUDE.md in 133. The typical file is 1,033 words, and most cover commands to build, run and test (78%) and pointers to other docs (74%).

Real files to read

From the best-known open-source Next.js products whose file is a real one (not a pointer to another), 200 to 4,000 words, covering at least three of the usual topics and naming Next.js. Each opens on GitHub.

ProjectFileStarsWordsCovers
Significant-Gravitas/AutoGPTAGENTS.md187,527943CommandsTestingDoc pointersStructureCode styleGit
bytedance/deer-flowAGENTS.md83,7031,785CommandsTestingDoc pointersCode style
calcom/cal.diyAGENTS.md48,9591,317CommandsTestingDoc pointersStructureGit
MHSanaei/3x-uiCLAUDE.md47,8341,905CommandsTestingDoc pointersCode styleGit
lfnovo/open-notebookAGENTS.md40,079501CommandsTestingDoc pointersGit
MODSetter/SurfSenseAGENTS.md16,3741,263CommandsTestingDoc pointersStructureGit
superset-sh/supersetAGENTS.md15,0832,054CommandsTestingDoc pointersStructure
elie222/inbox-zeroAGENTS.md12,4511,328CommandsTestingDoc pointersCode style
tambo-ai/tamboAGENTS.md11,1873,996CommandsTestingDoc pointersStructureCode styleGit
katanemo/planoCLAUDE.md7,085575CommandsTestingDoc pointersStructureCode style
ethereum/ethereum-org-websiteAGENTS.md5,9812,115CommandsTestingDoc pointersStructureCode style
vercel/eveAGENTS.md5,5292,036CommandsTestingDoc pointersStructureGit

What Next.js projects put in them

Share of the 190 files that cover each topic, against all 641 files we read.

Commands to build, run and test78% vs 78%
Pointers to other docs74% vs 68%
Testing65% vs 67%
Project structure58% vs 58%
Code style55% vs 51%
Git, commits and pull requests49% vs 46%

How they talk to the agent: 81% say “never” or “do not” somewhere (all files: 80%), 25% shout a rule in capitals like IMPORTANT or MUST (24%), and 21% tell it to ask before some changes (20%).

The tools they name

Package managerspnpm (58 files), npm (36 files), uv (25 files)

Tests and lintersPlaywright (41), Vitest (39), ESLint (36), pytest (34), Prettier (29), Biome (24)

Named more than in files generallyTailwind CSS (31), Zod (31), Redis (30), Biome (24), Turborepo (23), Vercel (20), MDX (19)

What they tell the agent

Instructions that recur across files, in our words; open one for the Next.js projects whose file says it.

About Next.js

About Tailwind CSS

About Zod

About Redis

About Biome

About Turborepo

About Vercel

A starting AGENTS.md for Next.js

The sections these files cover most, the package manager and checks Next.js projects name most, and the stack Next.js makers' products chose most often. Fill in the <placeholders>.

# AGENTS.md

<What this product does and who it is for, in a sentence or two.>

## Stack

- Frontend Framework: Next.js
- Hosting: Vercel
- Transactional Email: Resend
- Database: Supabase
- Payments: Stripe
- LLM API: OpenAI API
- Authentication: Clerk
- Web Analytics: Google Analytics

## Commands

- Install: `pnpm install`
- Run locally: `<command>`
- Test: `pnpm exec vitest run`
- End-to-end tests: `pnpm exec playwright test`
- Lint: `pnpm exec eslint .`

## Testing

Run `pnpm exec vitest run` and `pnpm exec playwright test` before calling a change done, and add a test with each fix or feature.

## Project structure

- `<folder>/`: <what lives there>
- More in <docs/…>

## Conventions

- <Naming, patterns and style the code does not show>
- Commits and pull requests: <your rules>

## Boundaries

- Ask before: <changes you want to approve first>
- Never: <files or actions that are off-limits>

<!-- Started from https://howmakersbuild.com/agents-md/nextjs — point CLAUDE.md here with a line: @AGENTS.md -->
  • pnpm: named in 58 of 190 instruction files from open-source projects built with Next.js.
  • Vitest: named in 39 of 190 instruction files from open-source projects built with Next.js.
  • Playwright: named in 41 of 190 instruction files from open-source projects built with Next.js.
  • ESLint: named in 36 of 190 instruction files from open-source projects built with Next.js.

Make one for your own stack →

Questions

What should an AGENTS.md for a Next.js project include?

In 190 files from open-source Next.js products: commands to build, run and test (78%), pointers to other docs (74%), testing (65%), project structure (58%), code style (55%), git, commits and pull requests (49%). The package manager they name most is pnpm (58 files).

AGENTS.md or CLAUDE.md?

Among these Next.js products, 167 keep an AGENTS.md and 133 a CLAUDE.md. Across every product we checked, 320 keep both, and in 170 of those the CLAUDE.md only points to the AGENTS.md (a symlink or a line like @AGENTS.md), so there's one file to maintain. Codex, Cursor, Copilot and others read AGENTS.md; Claude Code reads CLAUDE.md.

How long is a typical Next.js AGENTS.md?

The median is 1,033 words in these 190 files; across all 641 files we read, half are between 425 and 1,665 words.

How this is counted: the GitHub repos of open-source products built with Next.js, pushed to in the 180 days before 2026-10-12. We read each repo's AGENTS.md, CLAUDE.md and other agent files; what's published here is counts and links, not their text. All files, by the numbers.