nextjs-app-router-patterns

Design Next.js App Router architectures with Server Components, streaming, and Server Actions.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill nextjs-app-router-patterns-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router-patterns
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/frontend-mobile-development/skills/nextjs-app-router-patterns
Command: npx skills add https://github.com/Jhabbig/Habbig --skill nextjs-app-router-patterns-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build and optimize modern Next.js applications without getting stuck on App Router architecture, server/client boundaries, or data-loading complexity.

Core Features & Use Cases

  • Server Components and Streaming: Structure pages so critical content renders immediately while slower data streams in with Suspense.
  • Routing Patterns: Implement parallel routes, intercepting routes, loading and error states, and API route handlers with clean file conventions.
  • Data and Mutation Workflows: Use caching, revalidation, metadata generation, and Server Actions for performant full-stack interactions.
  • Use Case: When building a product dashboard or migrating from the Pages Router, this Skill helps you choose the right rendering mode, organize routes, and avoid common App Router mistakes.

Quick Start

Ask for a Next.js App Router implementation plan for a dashboard page that uses Server Components, streaming, and Server Actions.

Frequently Asked Questions about nextjs-app-router-patterns

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

FAQPage Schema
How do I structure Next.js App Router pages with Server Components and streaming?

Structure Next.js App Router pages by using Server Components to render critical content immediately while wrapping slower data fetches in Suspense boundaries for streaming. This approach ensures fast initial page loads and progressive data hydration.

What is the best way to migrate from Next.js Pages Router to App Router?

Migrating from the Next.js Pages Router to App Router involves restructuring routes using the new file conventions, mapping data fetching to Server Components, and replacing API routes with route handlers to optimize rendering modes and avoid common mistakes.

How do I use parallel and intercepting routes in Next.js?

Use parallel and intercepting routes in Next.js to render multiple pages simultaneously and intercept navigation for modals. This pattern uses specific file conventions to manage complex UI states like dashboards and dynamic route interception.

How do Server Actions work for data mutations in Next.js?

Server Actions in Next.js handle data mutations by executing asynchronous code directly on the server, reducing the need for separate API endpoints. They integrate with caching and revalidation to maintain performant full-stack interactions.

When should I use route handlers instead of Server Actions in Next.js?

Use Next.js route handlers instead of Server Actions when you need to expose API endpoints for external consumption or handle webhooks. Server Actions are better suited for form mutations and client-invoked server-side logic within your application.

How do I manage the server-client boundary in Next.js App Router?

Manage the server-client boundary in Next.js App Router by isolating client-side logic into specific components. This keeps Server Components as the default, optimizing data fetching and streaming while preventing unnecessary JavaScript from shipping to the client.