nextjs-best-practices

Codify server and client component, routing, and data-fetching patterns for Next.js App Router projects.

Updated May 25, 2026
One-click install
npx skills add https://github.com/yehezkieldio/formalist --skill nextjs-best-practices-yehezkieldio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-best-practices
Source: https://github.com/yehezkieldio/formalist/tree/main/.agents/skills/nextjs-best-practices
Command: npx skills add https://github.com/yehezkieldio/formalist --skill nextjs-best-practices-yehezkieldio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing scalable Next.js applications with optimal performance requires consistent patterns for choosing between server and client components, structuring routes, and fetching data.

Core Features & Use Cases

  • Server Component-first guidance to minimize client bundles while preserving interactivity where needed.
  • Clear routing conventions, file structure, and layout strategies for large-scale apps.
  • Data-fetching patterns (static, ISR, dynamic) with predictable caching and revalidation behavior.

Quick Start

Build a Next.js app that follows App Router principles by organizing pages, layouts, and components with server-first rendering and client interactivity where appropriate.

Frequently Asked Questions about nextjs-best-practices

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

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

Next.js App Router component decisions use a server-first approach to minimize client bundles, adding client components only where interactivity is required. This strategy ensures modular components and predictable rendering behavior across your application.

What are the best data-fetching patterns for scalable Next.js applications?

The best data-fetching patterns for scalable Next.js applications include static, ISR, and dynamic fetching. These patterns provide predictable caching and revalidation behavior, ensuring robust performance and predictable rendering across App Router projects.

How should I organize routes and file structure in large-scale Next.js apps?

Route organization in large-scale Next.js apps requires clear routing conventions and file structure strategies. Structuring pages and layouts systematically within the App Router ensures modular architecture and predictable component rendering behavior.

Does this approach work for projects needing both static generation and dynamic rendering?

This approach works for projects needing both static generation and dynamic rendering by applying distinct data-fetching patterns. It codifies ISR and dynamic fetching strategies with predictable caching and revalidation behavior to meet robust performance requirements.

Why does minimizing client bundles matter for Next.js performance?

Minimizing client bundles matters for Next.js performance because server component-first rendering reduces the JavaScript shipped to the browser. This approach preserves interactivity where needed while ensuring modular components and predictable rendering behavior.