next-best-practices

Guide Next.js development with file conventions and React Server Component boundaries.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/remiconnesson/v0-video2md --skill next-best-practices-remiconnesson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/remiconnesson/v0-video2md/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/remiconnesson/v0-video2md --skill next-best-practices-remiconnesson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for developing with Next.js, ensuring code quality, performance, and maintainability.

Core Features & Use Cases

  • File Conventions: Understand project structure, route segments, and special files.
  • RSC Boundaries: Detect and prevent invalid React Server Component patterns.
  • Data Patterns: Choose the right data fetching strategy (Server Components, Server Actions, Route Handlers).
  • Error Handling: Implement robust error handling with error.tsx and global-error.tsx.
  • Use Case: A developer is unsure about the correct way to fetch data in a new Next.js app. They consult this Skill to understand Server Components, Server Actions, and Route Handlers, choosing the most appropriate pattern for their needs.

Quick Start

Review the best practices for handling data fetching 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 is the best way to fetch data in Next.js Server Components?

Next.js data fetching best practices involve choosing between Server Components, Server Actions, and Route Handlers based on your specific rendering and mutation requirements. This Skill guides selecting the appropriate data pattern for efficient application development.

How do I prevent invalid React Server Component boundaries in Next.js?

To prevent invalid React Server Component boundaries, you must correctly structure your file conventions and understand the directives separating client and server code. This Skill helps detect and prevent invalid RSC patterns for robust development.

How do I implement error handling with error.tsx in Next.js?

Implement robust Next.js error handling by utilizing error.tsx and global-error.tsx special files to catch and manage runtime errors gracefully. This Skill provides solutions for robust error handling within your application's file conventions.

When should I use image and font optimization in Next.js?

Use Next.js image and font optimization during the bundling phase to ensure maximum performance and web development efficiency. This Skill covers best practices for applying these optimizations and managing your runtime selection.

Does Next.js metadata handling require specific file conventions?

Next.js metadata handling relies on specific special files and project structure conventions to manage SEO and rendering directives correctly. This Skill details how to leverage file conventions for optimal metadata implementation.