nextjs-patterns

Guide Next.js 14/15 App Router architecture with routing and component decisions.

1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Inteligentsensingsolutions/tdd-dev-workflow --skill nextjs-patterns-inteligentsensingsolutions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-patterns
Source: https://github.com/Inteligentsensingsolutions/tdd-dev-workflow/tree/main/skills/nextjs-patterns
Command: npx skills add https://github.com/Inteligentsensingsolutions/tdd-dev-workflow --skill nextjs-patterns-inteligentsensingsolutions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Next.js Patterns: App Router Architecture provides comprehensive guidance for designing robust Next.js App Router architectures, clarifying when to use server vs client components, how to structure routes, and how to apply advanced patterns for data fetching, caching, middleware, and performance.

Core Features & Use Cases

  • Decision trees for Server Components vs Client Components boundaries and push-the-client boundary concepts.
  • Comprehensive Routing Architecture guidance covering file conventions, route groups, parallel routes, intercepting routes, middleware, and route handlers.
  • Data Fetching, ISR/SSR/SSG strategies, caching, metadata, and Server Actions with form handling.
  • Anti-patterns and practical examples to avoid common pitfalls in Next.js 14/15+ projects.

Quick Start

Review the Server vs Client Components decision tree and apply the App Router routing guidelines to your Next.js project.

Frequently Asked Questions about nextjs-patterns

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

FAQPage Schema
How do I decide between Server Components and Client Components in the Next.js App Router?

To decide between Server Components and Client Components in the Next.js App Router, use a decision tree evaluating data fetching needs and interactivity. Push the client boundary downward to keep interactive logic isolated while leveraging server-side data fetching for performance.

What is the best way to structure routing and middleware in a Next.js 14/15+ project?

The best way to structure routing and middleware in Next.js 14/15+ involves applying file conventions, route groups, parallel routes, and intercepting routes. This architecture ensures clear routing paths and efficient request handling before route completion.

When should I use ISR, SSR, or SSG for data fetching in Next.js?

You should use ISR, SSR, or SSG for data fetching in Next.js based on your content freshness requirements. The framework provides strategies to optimize caching and rendering, balancing static generation with dynamic server-side rendering.

How do I handle form submissions using Server Actions in Next.js?

To handle form submissions using Server Actions in Next.js, implement server-side mutations directly within your App Router architecture. This pattern streamlines data updates without creating separate API endpoints, integrating seamlessly with form handling.

What are common anti-patterns to avoid when building Next.js App Router architectures?

Common anti-patterns to avoid when building Next.js App Router architectures include misplacing the server/client component boundary and improper middleware usage. Reviewing practical examples helps prevent these structural pitfalls in Next.js 14/15+ projects.

Does the Next.js App Router support route handlers and metadata optimization?

Yes, the Next.js App Router supports route handlers and metadata optimization. It provides specific patterns for creating API endpoints and defining best-practice metadata to enhance SEO and application performance.