One-click install
npx skills add https://github.com/MohammedSaudAlsahli/dotfiles --skill next-best-practices-mohammedsaudalsahli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-best-practices
Source: https://github.com/MohammedSaudAlsahli/dotfiles/tree/main/ai/agents-skills/next-best-practices
Command: npx skills add https://github.com/MohammedSaudAlsahli/dotfiles --skill next-best-practices-mohammedsaudalsahli

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidelines for writing Next.js applications that are optimized for performance, maintainability, and scalability.

Core Features & Use Cases

  • File Conventions: Follows Next.js file structure conventions for clear and efficient project organization.
  • RSC Boundaries: Ensures React Server Component patterns are correctly implemented.
  • Async Patterns: Covers async API usage and migration strategies for Next.js 15+.
  • Data Patterns: Offers best practices for data fetching, caching, and error handling.
  • Error Handling: Describes techniques for gracefully handling errors in Next.js.
  • Route Handlers: Guides on creating API endpoints with route.ts files.
  • Parallel & Intercepting Routes: Explains modal patterns and parallel routes.
  • Self-Hosting: Instructions for deploying Next.js outside of Vercel.
  • Debugging: Lists debugging tricks and tips for Next.js applications.
  • Performance Optimization: Focuses on image, font, and bundling optimization.
  • Security Best Practices: Includes error boundaries and navigation API usage for security.

Quick Start

Use the next-best-practices skill to ensure your Next.js project adheres to best practices.

Frequently Asked Questions about next-best-practices

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

FAQPage Schema
How do I handle async API requests in Next.js 15+?

Handling async API requests in Next.js 15+ requires following specific async patterns and migration strategies. This ensures your data fetching mechanisms remain compatible with updated React Server Component boundaries.

What are the best practices for React Server Components in Next.js?

Best practices for React Server Components involve correctly implementing RSC boundaries and structuring your project using Next.js file conventions. This approach optimizes component rendering and maintains clear separation between server and client logic.

How do I optimize Next.js performance for images and fonts?

Optimizing Next.js performance involves applying specific techniques for image, font, and bundling optimization. Implementing these strategies significantly improves application load times and overall user experience.

Can I self-host a Next.js application outside of Vercel?

Yes, you can self-host a Next.js application outside of Vercel by following dedicated self-hosting instructions. This allows you to deploy your application on your own infrastructure while maintaining its performance optimizations.

What is the best way to structure error handling and data fetching in Next.js?

The best way to structure error handling and data fetching in Next.js is to use established data patterns and error boundaries. This approach provides techniques for gracefully handling errors and managing caching effectively.

How do parallel and intercepting routes work for modal patterns in Next.js?

Parallel and intercepting routes work in Next.js by enabling advanced modal patterns and parallel routes within your application. Utilizing these routing mechanisms allows you to build complex, highly interactive user interfaces.