next-best-practices

Document Next.js best practices for development reviews and codebase compliance.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/AneekS/smartHire-BE-FE-v2 --skill next-best-practices-aneeks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/AneekS/smartHire-BE-FE-v2/tree/main/.agents/skills/next-best-practices
Command: npx skills add https://github.com/AneekS/smartHire-BE-FE-v2 --skill next-best-practices-aneeks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates Next.js best practices into a single, authoritative guide to standardize conventions and improve code quality across projects.

Core Features & Use Cases

  • File Conventions: outlines project structure, route segments, and middleware/redirect conventions.
  • RSC Boundaries & Data Patterns: helps detect invalid server/client patterns and optimize data fetching workflows.
  • Async Patterns, Runtime Selection, Directives, Functions: covers modern Next.js patterns including server actions, route handlers, and metadata strategies.
  • Metadata, OG Images, Image & Font Optimization, Bundling: provides guidance on SEO metadata, image optimization, font setup, and bundle considerations.
  • Debug Tricks, Suspense Boundaries, Parallel Routes: includes debugging tips, suspense usage, and parallel/intercepting route patterns.
  • Self-Hosting & Debugging: guidance on standalone deployments, caching, and performance debugging.

Quick Start

Review your Next.js project and apply the documented best-practices to ensure compliant architecture.

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 Next.js project files and route segments correctly?

Next.js project structure relies on specific file conventions for route segments, middleware, and redirects. Applying these best practices standardizes conventions, ensures compliant architecture, and improves code quality across projects.

How do I detect invalid server and client component boundaries in Next.js?

Detecting invalid server/client boundaries involves analyzing React Server Component (RSC) patterns and data fetching workflows. This Skill provides actionable guidance to identify invalid component patterns and optimize data workflows.

What's the best way to handle metadata and OG images for SEO in Next.js?

Handling metadata and OG images in Next.js involves specific metadata strategies and image optimization techniques. This guide provides actionable rules for SEO metadata setup, OG image generation, and font optimization.

How do I use Server Actions and Route Handlers in Next.js effectively?

Using Server Actions and Route Handlers effectively requires understanding modern Next.js async patterns and runtime selection. This Skill covers directives, server actions, route handlers, and async API changes.

Does this Next.js best practices guide cover parallel routes and suspense boundaries?

Yes, this Next.js best practices guide covers parallel and intercepting route patterns alongside suspense boundaries. It also includes debug tricks and performance debugging tips to handle these advanced mechanisms.