nextjs-app-router

Scaffold Next.js 13+ App Router projects with layouts, dynamic routes, and streaming.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill nextjs-app-router-thebushidocollective
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-nextjs/skills/nextjs-app-router
Command: npx skills add https://github.com/TheBushidoCollective/han --skill nextjs-app-router-thebushidocollective

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers the Next.js App Router, server components, streaming, and dynamic routing for modern web apps.

Core Features & Use Cases

  • App Directory Organization: Server and client components structure.
  • Dynamic Routes: generateStaticParams and metadata generation.
  • Loading & Streaming: Progressive rendering and Suspense.

Quick Start

Create a simple app router route with a layout and a streaming page.

Frequently Asked Questions about nextjs-app-router

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

FAQPage Schema
How do I set up dynamic routes in Next.js App Router?

Dynamic routes in App Router use file-system based routing with [slug] syntax in folder names. Create folders like app/posts/[id] to capture route parameters, then use generateStaticParams to pre-render pages and access params in your component via props.

What's the difference between server and client components in Next.js App Router?

Server components execute only on the server and can access databases directly; client components run in the browser and handle interactivity. App Router defaults to server components unless you add 'use client' at the top, letting you mix both for optimal performance and features.

How do I implement loading states and streaming in Next.js?

Streaming with App Router uses React Suspense boundaries and loading.js files. Place loading.js in any route segment to show UI while async content renders, and wrap components in Suspense to stream page chunks progressively for faster perceived performance.

Can I use nested layouts with App Router in Next.js?

Yes, App Router supports file-system based nested layouts through layout.js files in each directory. Layouts wrap child routes, persist across navigation, and can be nested at any depth—root layout.js applies globally, while segment layouts apply only to their route subtree.

Do I need to migrate from Pages Router to App Router?

App Router is the modern approach for Next.js 13+ apps and is recommended for new projects, but migration from Pages Router is gradual—both can coexist in the same project. Choose App Router for server components, streaming, and layout reuse; Pages Router works fine for existing apps.

How do I generate metadata for routes in App Router?

Export a metadata object or generateMetadata function from layout.js or page.js files to define page titles, descriptions, and Open Graph tags. App Router automatically handles merging metadata from parent and child segments for proper SEO across nested routes.