next-best-practices

Validate Next.js App Router code against file conventions and server-client boundaries.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/manhthien2005/FixNow --skill next-best-practices-manhthien2005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/manhthien2005/FixNow/tree/main/.claude/skills/next-best-practices
Command: npx skills add https://github.com/manhthien2005/FixNow --skill next-best-practices-manhthien2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you avoid common Next.js App Router mistakes that lead to broken routing, invalid server-client boundaries, hydration issues, poor performance, and fragile deployments.

Core Features & Use Cases

  • File and route conventions: Organize pages, layouts, route handlers, parallel routes, and intercepting routes correctly.
  • Server/client boundary validation: Catch async client components, non-serializable props, and improper use of hooks or server APIs.
  • Data, metadata, and runtime guidance: Choose the right fetching pattern, generate SEO metadata, optimize images and fonts, and select the correct runtime.
  • Example use case: Review a Next.js 15 App Router project before launch to fix async params, metadata placement, route handler conflicts, and hydration risks.

Quick Start

Ask the skill to review your Next.js App Router codebase for routing, async params, metadata, and server-client boundary issues.

Frequently Asked Questions about next-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Next.js App Router file conventions and route handlers?

To validate Next.js App Router code, review your project against file conventions for pages, layouts, and route handlers to catch routing conflicts and ensure correct organization. This prevents broken routing and fragile deployments.

Why does my Next.js 15 app crash when accessing params or cookies?

Next.js 15 crashes often occur because params, cookies, and headers are now asynchronous. You must await these async request APIs before accessing their values to avoid runtime errors.

What is the correct server-client boundary for React Server Components in Next.js?

The correct server-client boundary requires passing only serializable props to client components, avoiding async client components, and preventing improper use of hooks or server APIs to stop hydration issues.

How do I fix hydration issues and invalid server-client boundaries in Next.js?

Fix hydration and server-client boundary issues by validating your React Server Components for non-serializable props, improper hook usage, and async client components. Correcting these prevents runtime mismatches.

Does this Next.js review guidance apply to older versions or only Next.js 15+?

This review guidance requires Next.js 15+ because it specifically targets async params promises, async cookies and headers access, and safe React Server Components usage introduced in that version.

What's the best way to optimize images and generate SEO metadata in Next.js App Router?

The best way to optimize images and generate SEO metadata is by validating your data-fetching patterns and metadata file placement within the App Router to ensure correct runtime selection and performance.