next-best-practices
Comprehensive Next.js development guidelines covering file structure, RSC patterns, data fetching, optimization, and error handling.
- Covers 15+ topic areas including file conventions, route segments, RSC boundaries, async patterns, metadata generation, and image/font optimization
- Provides runtime selection guidance, directive usage, and error handling strategies with specific file conventions like
error.tsxandnot-found.tsx - Includes data fetching patterns, route handler best practices, bundling considerations, and hydration error debugging
- Addresses advanced patterns such as parallel routes, intercepting routes, Suspense boundaries, and self-hosting with Docker
Next.js Best Practices
Apply these rules when writing or reviewing Next.js code.
File Conventions
See file-conventions.md for:
- Project structure and special files
- Route segments (dynamic, catch-all, groups)
- Parallel and intercepting routes
- Middleware rename in v16 (middleware → proxy)
RSC Boundaries
Detect invalid React Server Component patterns.
See rsc-boundaries.md for:
- Async client component detection (invalid)
- Non-serializable props detection
More from vercel-labs/next-skills
next-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
27.5Knext-upgrade
Upgrade Next.js to the latest version following official migration guides and codemods
18.3Knext-best-practice
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
2
More in Next.js
vercel-react-best-practices
69 prioritized React and Next.js performance rules across 8 categories
vercel-labs/agent-skillsvercel-composition-patterns
Composable component architecture patterns for scalable Next.js apps
vercel-labs/agent-skillsdeploy-to-vercel
Deploy Next.js apps to Vercel with correct config and environment setup
vercel-labs/agent-skillsturborepo
Turborepo task pipelines, caching, remote cache, and CI configuration
vercel/turborepoai-sdk
Vercel AI SDK: generateText, streamText, tool calling, and useChat
vercel/ai