Updated
AGENTS.md · Next.js

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

Of 376 actively developed open-source products built with Next.js, 231 (61%) keep instruction files for coding agents: AGENTS.md in 186, CLAUDE.md in 138. The typical file is 1,121 words, and most cover commands to build, run and test (77%) and pointers to other docs (72%).

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,7911,721CommandsTestingDoc pointersStructureCode styleGit
bytedance/deer-flowAGENTS.md84,5071,767CommandsTestingDoc pointersCode style
calcom/cal.diyAGENTS.md49,4371,317CommandsTestingDoc pointersStructureGit
MHSanaei/3x-uiCLAUDE.md48,7241,917CommandsTestingDoc pointersCode styleGit
lfnovo/open-notebookAGENTS.md40,643501CommandsTestingDoc pointersGit
arc53/DocsGPTAGENTS.md18,3362,162CommandsTestingDoc pointersGit
MODSetter/SurfSenseAGENTS.md16,6511,230CommandsTestingDoc pointersStructureGit
elie222/inbox-zeroAGENTS.md12,8401,328CommandsTestingDoc pointersCode style
assistant-ui/assistant-uiAGENTS.md12,7871,207CommandsTestingDoc pointers
tambo-ai/tamboAGENTS.md11,2093,996CommandsTestingDoc pointersStructureCode styleGit
katanemo/planoCLAUDE.md7,099575CommandsTestingDoc pointersStructureCode style
ethereum/ethereum-org-websiteAGENTS.md5,9932,187CommandsTestingDoc pointersStructureCode style

What Next.js projects put in them

Share of the 209 files that cover each topic, against all 731 files we read.

Commands to build, run and test77% vs 79%
Pointers to other docs72% vs 69%
Testing65% vs 67%
Project structure54% vs 57%
Code style54% vs 49%
Git, commits and pull requests49% vs 46%

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

The tools they name

Package managerspnpm (60 files), npm (40 files), uv (30 files)

Tests and lintersVitest (44), Playwright (40), pytest (39), ESLint (39), Prettier (31), Biome (25)

Named more than in files generallyRedis (31), Tailwind CSS (31), Zod (30), Biome (25), Turborepo (22), Vercel (22)

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 Redis

About Tailwind CSS

About Zod

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 60 of 209 instruction files from open-source projects built with Next.js.
  • Vitest: named in 44 of 209 instruction files from open-source projects built with Next.js.
  • Playwright: named in 40 of 209 instruction files from open-source projects built with Next.js.
  • ESLint: named in 39 of 209 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 209 files from open-source Next.js products: commands to build, run and test (77%), pointers to other docs (72%), testing (65%), project structure (54%), code style (54%), git, commits and pull requests (49%). The package manager they name most is pnpm (60 files).

AGENTS.md or CLAUDE.md?

Among these Next.js products, 186 keep an AGENTS.md and 138 a CLAUDE.md. Across every product we checked, 354 keep both, and in 189 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,121 words in these 209 files; across all 731 files we read, half are between 444 and 1,727 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-28. 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.