Claude Rules for Next.js
CLAUDE.md rules written specifically for Next.js projects. Covers App Router patterns, Server vs Client Components, data fetching, API routes, and Vercel deployment conventions.
6 rules matching Next.js
Next.js CLAUDE.md Rules
Next.js is one of the highest-leverage targets for a CLAUDE.md file. The framework has many overlapping conventions — App Router vs Pages Router, Server vs Client Components, the rules around "use client", route handlers vs API routes, next/navigation vs next/router — and Claude Code's training data spans every version Next.js has ever shipped. Without explicit rules, Claude often mixes patterns from Next.js 12, 13, 14, and 15, producing code that compiles but conflicts with how your app is actually built. The Next.js CLAUDE.md rules below come from real production projects: they pin which router the project uses, set rendering defaults, define how data is fetched in Server Components, list the API route handler patterns the team has standardized on, and call out the legacy patterns to avoid. If you're starting a Next.js CLAUDE.md from scratch, the most useful section to add first is a single-line statement of which Next.js version and which router pattern your app uses.
Claude Code CLAUDE.md
by @constellos
TypeScript types and type gen hooks for Claude Code: system tools, MCP tools, session transcripts, and hook events
Archie CLAUDE.md
by @BitRaptors
Architecture rules your AI coding agent can't break — generates AGENTS.md, per-folder CLAUDE.md, and Claude Code hooks from your codebase.
PocketWatch CLAUDE.md
by @viperrcrypto
CLAUDE.md for the PocketWatch project (TypeScript).
OmoiOS CLAUDE.md
by @kivo360
Spec-driven multi-agent orchestration — autonomous development workforce powered by Claude & OpenHands
Thepopebot CLAUDE.md
by @stephengpope
The Pope Bot is an autonomous AI agent that you can configure and build to do just about anything you want, all day, everyday, 24/7.
React Joyride CLAUDE.md
by @gilbarbara
Create guided tours in your apps
Why add Next.js rules to your CLAUDE.md?
Next.js has a lot of conventions that Claude doesn't always follow by default — whether it's App Router vs Pages Router data fetching, when to use Server Components, or how to structure route handlers. A good CLAUDE.md for Next.js tells Claude exactly which patterns your project uses, preventing it from generating outdated Pages Router code in an App Router project or reaching for getServerSideProps when you want server components.