next-best-practices
Check version-matched Next.js App Router documentation before changing routes, server components, data access, caching, or deployment behavior.
SKILL.mdskills/next-best-practices/SKILL.md
GitHubNext.js guidance for this starter
This file is original project guidance. For the broader upstream skill, see vercel-labs/next-skills. Its text is linked rather than redistributed here.
- Inspect this project's
package.jsonandnode_modules/next/dist/docs/before editing Next.js code. Next.js 16 behavior can differ from older examples. - Keep server-only credentials and model calls in server modules. Make a component a client component only when it needs browser state or events.
- Validate route input on the server, even if the browser already validated it. Preserve the access check on both run creation and run streaming.
- Review the installed documentation for route handlers, runtime choice, async request APIs, caching, and metadata when touching those features.
- Run
bun run typecheckandbun run buildafter framework or routing changes, then exercise the affected route in a browser.
Official references: Next.js App Router, Next.js route handlers.