next-best-practices

Guide Next.js App Router projects with centralized best practices for file conventions and data patterns.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/liminal-ai/code-steward --skill next-best-practices-liminal-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/liminal-ai/code-steward/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/liminal-ai/code-steward --skill next-best-practices-liminal-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide consolidates Next.js best practices across file conventions, routing, data patterns, metadata, and optimization to help teams build robust, scalable apps faster.

Core Features & Use Cases

  • Covers file conventions, RSC boundaries, data patterns, async APIs, and metadata across the Next.js App Router.
  • Provides decision guidance for runtime selection, directives, error handling, bundling, image/font optimization, and debugging tricks.
  • Use cases include building maintainable route handlers, server components, and performant applications with minimal configuration.

Quick Start

Read the included topics and apply the principles to initialize or review a Next.js project for consistent structure and performance.

Frequently Asked Questions about next-best-practices

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

FAQPage Schema
What are the best practices for structuring Next.js App Router projects?

Next.js App Router best practices involve following specific file conventions, defining clear React Server Component boundaries, and structuring route handlers consistently to ensure scalable project architecture.

How do I manage metadata in Next.js server components?

To manage metadata in Next.js server components, apply centralized metadata strategies that leverage the App Router's built-in APIs for defining and exporting metadata objects directly from your component files.

What is the best way to handle data fetching and async APIs in Next.js?

The best way to handle data fetching in Next.js is by utilizing server components and route handlers with async APIs, ensuring data patterns remain robust and performance is optimized through proper RSC boundary definitions.

Does this Next.js guide cover error handling and performance optimization?

Yes, this Next.js guide covers error handling and performance optimization by providing decision guidance for runtime selection, directives, image and font optimization, and debugging tricks for App Router projects.

When should I use React Server Components instead of Client Components in Next.js?

You should use React Server Components in Next.js when fetching data or accessing backend resources directly, reserving Client Components for interactivity, thereby strictly enforcing RSC boundaries for better performance.