nextjs-best-practices

Configure Next.js App Router projects with server/client component and data fetching guidance.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Hanseooo/hanseo-opencode-workflows --skill nextjs-best-practices-hanseooo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-best-practices
Source: https://github.com/Hanseooo/hanseo-opencode-workflows/tree/main/skills/nextjs-best-practices
Command: npx skills add https://github.com/Hanseooo/hanseo-opencode-workflows --skill nextjs-best-practices-hanseooo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamline adoption of Next.js App Router patterns by codifying server/client component decisions, routing conventions, and data-fetching strategies to improve performance and maintainability.

Core Features & Use Cases

  • Server vs Client Components guidance and decision criteria for common UI patterns.
  • Data fetching patterns including default/static, ISR, and on-demand no-store strategies.
  • Routing principles covering file conventions, route groups, parallel routes, and intercepting modals.

Quick Start

Audit a Next.js app against the recommended App Router patterns and implement the guidance to optimize component usage, routing, and data fetching.

Frequently Asked Questions about nextjs-best-practices

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

FAQPage Schema
When should I use server components versus client components in the Next.js App Router?

Server components vs client components decisions in the Next.js App Router depend on whether the UI requires interactivity or direct data fetching. Use server components for static rendering and data access, and client components for state and event handling.

What is the best way to fetch data in Next.js App Router projects?

Data fetching in Next.js App Router supports default static rendering, Incremental Static Regeneration (ISR), and on-demand no-store strategies. Choose based on how frequently your data changes and whether you need real-time cache invalidation.

How do I organize routing and file conventions in a Next.js App Router project?

Organize Next.js App Router routing using file conventions, route groups for logical separation, parallel routes for simultaneous rendering, and intercepting routes to handle modals cleanly.

Does this Next.js App Router guidance apply to large scale applications?

Yes, the App Router patterns apply across small to large Next.js apps. The guidance covers modular routing organization, server and client component boundaries, and performance optimizations suited for scaling.

How do I optimize Next.js App Router performance for dynamic pages?

Optimize Next.js App Router performance by strategically moving interactivity to client components, leveraging server components for data fetching, and applying appropriate caching strategies like ISR or no-store for dynamic content.