nextjs-best-practices

Codify Next.js App Router server/client boundaries, data fetching, and routing patterns.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/renpayero/dakodev-redesign --skill nextjs-best-practices-renpayero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-best-practices
Source: https://github.com/renpayero/dakodev-redesign/tree/main/.agent/skills/nextjs-best-practices
Command: npx skills add https://github.com/renpayero/dakodev-redesign --skill nextjs-best-practices-renpayero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modern Next.js App Router development often suffers from inconsistent component boundaries, scattered data-fetching decisions, and suboptimal routing layouts. This Skill provides a concise, opinionated framework for server vs client components, data fetching strategies, and routing conventions to unify approach across teams.

Core Features & Use Cases

  • Server vs Client Component guidance with a decision tree
  • Data fetching and routing patterns for App Router
  • Performance optimizations and metadata best practices for Next.js apps

Quick Start

Apply the Next.js App Router guidelines to scaffold your project with server components default, limiting client components to interactive parts.

Frequently Asked Questions about nextjs-best-practices

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

FAQPage Schema
How do I structure server and client components in Next.js App Router?

Structure Next.js App Router components by defaulting to server components for data fetching and limiting client components strictly to interactive elements. This approach codifies the server/client boundary to streamline development and unify routing patterns across teams.

What is the best way to handle data fetching in Next.js server components?

The best way to handle data fetching in Next.js server components is using direct server-side data fetching strategies. This approach leverages App Router capabilities like ISR to optimize performance without scattering data-fetching decisions across your project.

When do I need to use client components instead of server components in Next.js?

You need to use client components in Next.js when adding interactivity or state to specific UI parts. A decision tree framework helps isolate these interactive elements, keeping the rest of the App Router architecture as performant server components.

Does this Next.js App Router guidance cover routing layouts and error handling?

Yes, this Next.js App Router guidance covers routing layouts and error handling. It provides recommendations on file conventions, component placement, and routing patterns to ensure suboptimal layouts and inconsistent boundaries are avoided.

Why does my Next.js App Router project suffer from inconsistent component boundaries?

Your Next.js App Router project suffers from inconsistent component boundaries due to scattered data-fetching decisions and suboptimal routing layouts. Applying an opinionated framework standardizes server versus client component placement and routing conventions.

Are there specific performance optimizations for Next.js App Router applications?

Yes, there are specific performance optimizations for Next.js App Router applications. They include metadata best practices, strategic server-side data fetching, and proper component placement to reduce client-side JavaScript and streamline rendering.