What problem does it solve?
This Skill reduces bugs and performance regressions by codifying Next.js best practices across App Router conventions, Server/Client boundaries, async data patterns, and production-ready error and routing behavior.
Core Features & Use Cases
- File conventions & routing correctness: Standardize App Router file roles (layout/page/route handling, parallel routes, intercepting routes) to prevent 404s and inconsistent renders.
- RSC boundary validation: Detect invalid client patterns (async client components) and unsafe server-to-client prop serialization (non-serializable values).
- Modern async API usage: Apply Next.js 15+ async request API changes (Promise-based params/searchParams and async cookies/headers) and the recommended migration codemod.
- Production-grade patterns: Enforce async error handling, correct navigation semantics, and robust runtime selection (Node vs Edge), plus metadata and OG image conventions.
- Performance hygiene: Prefer next/image and next/font optimizations, avoid hydration mismatches, and apply bundling fixes for server-incompatible packages.
- API & integration discipline: Use route handlers appropriately (including conflicts with page.tsx) and choose Server Actions vs Route Handlers based on mutation vs public/external needs.
Quick Start
Ask an AI to review a specific Next.js file for App Router correctness using next-best-practices, for example: "Review my app route handler and page.tsx for conflicts, async params/searchParams correctness, RSC boundary issues, and proper error handling."