r/nextjs•
KippieG

I made a CLAUDE.md for Next.js 15 App Router (with explanations for every rule)

News

Every time I start a new Next.js project with an AI coding assistant, I end up

writing the same context file from scratch: "use App Router not Pages Router",

"params is a Promise in Next.js 15", don't add 'use client' unless you need it.

So I collected them into a ready-to-use CLAUDE.md — works with Claude Code,

Cursor, Windsurf, and Copilot.

The key differentiator: every rule has a WHY. Not just "don't fetch in useEffect"

but "because Server Components can do it directly with async/await, which removes

the loading flicker and bundle weight."

Covers:

- Server vs Client Components (when to actually add "use client")

- Caching in Next.js 15 (fetch is NOT cached by default — explained)

- params/searchParams as Promises in Next.js 15

- Server Actions validation pattern

- Metadata API, common AI mistakes with App Router

GitHub: https://github.com/KippieG/stack-rules

Also has Hono, SvelteKit, Drizzle, Prisma, FastAPI. PRs welcome.

Posted Jun 3, 2026, 11:55 AM UTC

08
Loading comments…