next-best-practices

Enforce Next.js App Router best practices for file conventions and data fetching.

5|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/mohamedgshoaib/reway --skill next-best-practices-mohamedgshoaib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/mohamedgshoaib/reway/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/mohamedgshoaib/reway --skill next-best-practices-mohamedgshoaib

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a comprehensive, standardized set of rules and patterns for Next.js development, preventing common architectural pitfalls, hydration errors, and inefficient data fetching.

Core Features & Use Cases

  • Architectural Guidance: Enforces correct RSC boundaries, runtime selection, and file conventions to ensure optimal performance.
  • Error & Data Handling: Provides battle-tested patterns for error boundaries, async data fetching, and mutation handling via Server Actions.
  • Optimization: Offers clear directives for image, font, and script optimization to improve Core Web Vitals.

Quick Start

Ask the next-best-practices skill to review your current page component for potential hydration errors and suggest the correct async data fetching pattern.

Frequently Asked Questions about next-best-practices

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

FAQPage Schema
How do I structure React Server Components in Next.js App Router to avoid hydration errors?

Next.js App Router prevents hydration errors by enforcing strict React Server Component boundaries and file conventions. Separating server and client component logic ensures scalable architecture and eliminates runtime mismatches.

What is the best way to handle async data fetching in Next.js Server Components?

The best way to handle Next.js async data fetching is applying standardized patterns within React Server Components. This approach uses battle-tested directives for async requests and Server Actions mutations to ensure performant web applications.

How do I optimize Core Web Vitals in Next.js using built-in optimization features?

Optimize Core Web Vitals in Next.js by applying clear directives for image, font, and script bundle optimization. Enforcing these optimization techniques improves overall web application performance and significantly boosts technical metadata management.

Can I use Server Actions for data mutations in Next.js App Router?

Yes, you can use Server Actions for data mutations in Next.js App Router. The framework provides battle-tested patterns for error boundaries and mutation handling via Server Actions to satisfy technical requirements for robust web applications.

Why does my Next.js App Router architecture suffer from inefficient data fetching and common pitfalls?

Next.js App Router architecture suffers from inefficient data fetching due to ignoring standardized rules and patterns. Preventing common architectural pitfalls requires enforcing correct runtime selection and strict React Server Component boundaries.