nextjs

Guide Next.js v13+ App Router development with Server Components and routing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/timelessco/recollect --skill nextjs-timelessco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/timelessco/recollect/tree/main/.claude/skills/nextjs
Command: npx skills add https://github.com/timelessco/recollect --skill nextjs-timelessco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers through building Next.js applications, covering App Router, Server Components, data fetching patterns, routing, and performance optimizations—helping teams deliver server-rendered and static sites faster.

Core Features & Use Cases

  • App Router & Routing: File-based routing in app/ and nested layouts
  • Server / Client Components: Server components by default, with 'use client' directives
  • Data Fetching: ISR, SSG, SSR patterns
  • Performance & SEO: Image optimization, metadata, fonts
  • API Routes & Middleware: Route handlers, middleware for auth
  • Migration Guidance: From Pages router to App Router
  • Deployment: Vercel and other deployments

Quick Start

Start a new project with npx create-next-app@latest my-app, then enable App Router, and begin implementing routes in app/.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I build a production-grade Next.js application with App Router?

App Router enables file-based routing in the app/ directory with nested layouts, Server Components by default, and built-in support for data fetching patterns like ISR and SSG. Start with npx create-next-app@latest, enable App Router, then structure routes as files within app/ to automatically create nested pages and layouts for server-rendered and static sites.

What's the difference between Server Components and Client Components in Next.js?

Server Components execute only on the server, reducing bundle size and enabling direct database access, while Client Components run in the browser for interactivity. Next.js uses Server Components by default in App Router; add 'use client' directive at the top of files that need browser capabilities like event handlers or hooks.

How do I optimize performance and SEO in Next.js applications?

Next.js provides automatic image optimization, metadata management for SEO, font optimization, and Suspense-enabled streaming. Configure metadata in layout files, use the Image component for responsive images, and leverage nested layouts to manage head tags and fonts across route segments for faster page loads and better search visibility.

Can I migrate an existing Next.js Pages Router project to App Router?

Yes, App Router migration is supported for v13+ projects. Guidance covers incremental adoption: create an app/ directory alongside pages/, implement new routes using App Router conventions, then gradually move existing Pages Router routes. Server Components, nested layouts, and improved data fetching patterns provide performance and maintainability benefits during the transition.

What data fetching patterns does Next.js App Router support?

App Router supports ISR (Incremental Static Regeneration) for periodic updates, SSG (Static Site Generation) for pre-rendered pages, and SSR (Server-Side Rendering) for dynamic content. Use async components and fetch() in Server Components to automatically cache or revalidate data, reducing client-side requests and improving performance.

How do I handle authentication and routing logic in Next.js?

API Routes and middleware enable authentication workflows and request handling. Create route handlers in app/api/ for endpoints, use middleware for authentication checks and request interception, and leverage Server Components to protect sensitive data. Middleware executes before route handlers, allowing centralized auth logic across your application.