nextjs-app-router-patterns

Implements Next.js 14+ App Router patterns including Server Components, streaming, and parallel routes.

2|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/SkinnnyJay/simpill-utils --skill nextjs-app-router-patterns-skinnnyjay
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nextjs-app-router-patterns
Source: https://github.com/SkinnnyJay/simpill-utils/tree/main/.agents/skills/nextjs-app-router-patterns
Command: npx skills add https://github.com/SkinnnyJay/simpill-utils --skill nextjs-app-router-patterns-skinnnyjay

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building modern Next.js applications with the App Router requires understanding Server Components, streaming, caching, and routing conventions that differ significantly from the Pages Router, and this Skill provides production-ready patterns to avoid common architectural mistakes. ## Core Features & Use Cases - Server and Client Component Patterns: Guidance on when to use Server Components versus 'use client' boundaries, with data fetching colocated in components. - Advanced Routing: Implementations of parallel routes, intercepting routes for modals, route handlers for APIs, and dynamic metadata generation for SEO. - Caching and Mutations: Strategies for ISR, tag-based revalidation, and Server Actions for form mutations with progressive enhancement. - Use Case: When migrating an e-commerce site to Next.js 14, use this Skill to structure a product page with streaming reviews, an intercepted photo modal, and a Server Action-powered add-to-cart button. ## Quick Start Use the nextjs-app-router-patterns skill to scaffold a product listing page with Server Components, Suspense streaming, and tag-based cache revalidation.

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 fetch data in Next.js App Router Server Components?▼

Fetch data directly inside async Server Components using the fetch API with caching options like next.revalidate for ISR or next.tags for tag-based invalidation. Colocate the fetch call in the component that consumes the data rather than prop-drilling from a parent.

When should I use 'use client' in Next.js?▼

Add 'use client' only when a component needs interactivity such as useState, useEffect, event handlers, or browser APIs. Start with Server Components by default and push client boundaries as far down the component tree as possible.

How do Server Actions work in Next.js 14?▼

Server Actions are async functions marked with 'use server' that run on the server and can be called from Client Components or forms. They support revalidateTag and revalidatePath for cache updates and redirect for navigation after mutations.

Does Next.js App Router support streaming responses?▼

Yes, wrap slow data-fetching components in Suspense boundaries or add a loading.tsx file to stream UI progressively. The initial shell renders immediately while slower sections like reviews or recommendations stream in as their data resolves.

How do I build a modal with intercepting routes in Next.js?▼

Create a slot like @modal with a (.)photos/[id] intercepting route that renders the content in a Modal component, plus a default.tsx fallback. The same route renders as a full page on direct navigation and as a modal when navigated to client-side.

What are the limitations of passing props from Server to Client Components?▼

Props crossing the Server-to-Client boundary must be serializable, so functions, class instances, and Dates cannot be passed directly. Fetch data in the Server Component and pass plain objects, or use Server Actions for callbacks.