next-best-practices

Enforce Next.js best practices for file conventions, RSC boundaries, and data patterns.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/daodaolee/ai-driven-sdlc --skill next-best-practices-daodaolee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/daodaolee/ai-driven-sdlc/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/daodaolee/ai-driven-sdlc --skill next-best-practices-daodaolee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures your Next.js code adheres to modern best practices, improving performance, maintainability, and developer experience.

Core Features & Use Cases

  • Code Quality: Enforces conventions for file structure, RSC boundaries, and data fetching.
  • Performance: Guides optimization for image/font loading, bundling, and caching.
  • Use Case: A developer is unsure about the correct way to handle dynamic metadata or optimize image loading in their Next.js app. This Skill provides clear, actionable guidance and code examples.

Quick Start

Review the provided Next.js code for adherence to best practices regarding data fetching and component structure.

Frequently Asked Questions about next-best-practices

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

FAQPage Schema
How do I structure data fetching in Next.js App Router with React Server Components?

Data fetching in Next.js App Router should leverage React Server Components to fetch data directly on the server, enforcing proper RSC boundaries and async API patterns for optimal performance and maintainability.

What's the best way to optimize image and font loading in Next.js?

The best way to optimize image and font loading in Next.js is by following framework-specific best practices for bundling and caching, which guide developers toward optimal patterns for modern web application performance.

How do I handle dynamic metadata and error boundaries in Next.js?

Handling dynamic metadata and errors in Next.js requires adhering to specific file conventions and error handling patterns, providing clear guidance and actionable code examples for modern web development.

Does this Next.js best practices guidance work for route handlers and async APIs?

Yes, this guidance enforces Next.js best practices across route handlers and async APIs, requiring strict adherence to React Server Components and App Router conventions to ensure proper implementation.

When should I not use React Server Components in Next.js?

You should not use React Server Components for logic requiring client-side interactivity, as this framework guidance enforces RSC boundaries and conventions to separate server-side data patterns from client-side interactions.

What are the Next.js file conventions for the App Router?

Next.js file conventions for the App Router dictate specific structures for routing, metadata, and error handling, ensuring developers follow optimal patterns for modern web application development.