nextjs

Guide Next.js App Router development with server components and data fetching.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill nextjs-repairyourtech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/stack/frameworks/nextjs
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill nextjs-repairyourtech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to building modern web applications with Next.js, covering its advanced features and best practices to ensure efficient and scalable development.

Core Features & Use Cases

  • App Router Architecture: Understand directory structure, layouts, and dynamic routing.
  • Server/Client Components: Learn to differentiate and effectively use server and client components.
  • Data Fetching & Rendering: Master various data fetching patterns, caching, and rendering strategies (SSG, ISR, SSR, Streaming).
  • Middleware & Optimization: Implement middleware for auth and redirects, optimize images and fonts.
  • Deployment: Deploy Next.js applications efficiently.
  • Use Case: When building a new Next.js application, use this guide to set up the project structure, implement data fetching for dynamic content, and configure optimal rendering strategies for performance.

Quick Start

Use the nextjs skill to understand how to implement Server Components for data fetching.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I fetch data using server components in Next.js App Router?

Next.js server components fetch data directly on the server using async/await syntax. This approach leverages server-side rendering strategies like SSR and SSG to fetch dynamic content securely without client-side JavaScript overhead.

What is the difference between SSG, ISR, and SSR rendering in Next.js?

SSG pre-renders pages at build time, ISR allows static regeneration incrementally, and SSR renders pages per request. Next.js App Router supports these rendering techniques alongside streaming to optimize dynamic content delivery and performance.

Can I use middleware for authentication and redirects in Next.js?

Yes, Next.js middleware intercepts incoming requests to handle authentication checks and execute redirects. It runs before a request completes, allowing you to control access and modify routing behavior based on user session or token states.

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

Next.js provides built-in components for image and font optimization to automatically resize, serve modern formats, and reduce layout shifts. Metadata APIs manage SEO tags, ensuring proper search engine indexing and optimal page performance.

What are common Next.js anti-patterns for production applications?

Common Next.js anti-patterns include overusing client components instead of server components, improper environment variable management, and ignoring streaming benefits. Avoiding these ensures scalable, production-ready applications with optimal rendering and caching.

How do Next.js parallel and intercepting routes work?

Parallel routes render multiple pages simultaneously within a single layout using named slots. Intercepting routes load a route within the current context, enabling complex interfaces like modal previews while maintaining the underlying URL structure.