next-best-practices

Guide Next.js development with best practices for file conventions and data patterns.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/Temp-37538/moderniptvplayer --skill next-best-practices-temp-37538
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/Temp-37538/moderniptvplayer/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/Temp-37538/moderniptvplayer --skill next-best-practices-temp-37538

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on Next.js best practices, helping developers write more efficient, maintainable, and performant applications by covering file conventions, component boundaries, data fetching, and optimization strategies.

Core Features & Use Cases

  • Code Quality: Enforces best practices for file structure, RSC boundaries, and async patterns.
  • Performance Optimization: Offers insights into image/font optimization, bundling, and runtime selection.
  • Error Handling & Debugging: Guides on robust error handling and effective debugging techniques.
  • Use Case: A developer is unsure about the correct way to handle data fetching in a new Next.js 15+ project. This Skill provides clear patterns for Server Components, Server Actions, and Route Handlers, along with strategies to avoid data waterfalls.

Quick Start

Review the best practices for handling data patterns in Next.js applications.

Frequently Asked Questions about next-best-practices

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

FAQPage Schema
What's the best way to handle data fetching in Next.js Server Components?

Next.js data fetching in Server Components should use direct async patterns to avoid data waterfalls. Fetching data directly on the server minimizes client-side JavaScript and leverages React Server Component boundaries for optimal performance.

How do I fix hydration errors in a Next.js application?

Hydration errors in Next.js occur when server-rendered HTML mismatches client output. Debug these errors by checking Suspense boundaries, verifying client directives, and ensuring consistent rendering logic between server and client component boundaries.

When should I use parallel and intercepting routes in Next.js?

Parallel and intercepting routes in Next.js enable advanced routing UI patterns like modals and split views. Use them when you need to render multiple route segments simultaneously or intercept navigation to show contextual content without losing the current route context.

Does Next.js support automatic image and font optimization for web development?

Next.js provides built-in image and font optimization to improve web development performance. It automatically serves correctly sized images, prevents layout shift, and optimizes font loading to reduce visual shifts and enhance page speed.

How do I select the right runtime for Next.js route handlers?

Next.js runtime selection for route handlers depends on whether your code needs Node.js APIs or edge capabilities. Choose the Node.js runtime for heavy processing and the edge runtime for low-latency, geographically distributed execution.

What are the best practices for self-hosting a Next.js application?

Self-hosting a Next.js application requires configuring a Node.js server or custom Docker container. Best practices include managing environment variables, handling image optimization cache, and ensuring your server supports the required streaming and server action responses.