nextjs-patterns

Teach Next.js App Router patterns, Server Components, and routing best practices.

6|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/SPeeDoA1/everything-opencode --skill nextjs-patterns-speedoa1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-patterns
Source: https://github.com/SPeeDoA1/everything-opencode/tree/main/.opencode/skills/stacks/nextjs-patterns
Command: npx skills add https://github.com/SPeeDoA1/everything-opencode --skill nextjs-patterns-speedoa1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modern Next.js development patterns focusing on App Router, Server Components, and production best practices.

Core Features & Use Cases

  • App Router & nested layouts: structure, routing, and data-fetching patterns for scalable apps.
  • Server Components by default: optimize rendering and performance with server-driven UI.
  • Migration & best practices: guidance for migrating from Pages Router to App Router and implementing server actions, middleware, and metadata.

Quick Start

  1. Create or adapt your Next.js 13+ project to use the App Router (app directory) and enable server components by default.
  2. Implement layout.tsx, page.tsx, error.tsx, loading.tsx, and server actions as needed.
  3. Start the development server and iterate on routing and data-fetching patterns.

Frequently Asked Questions about nextjs-patterns

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

FAQPage Schema
How do I migrate from Next.js Pages Router to App Router?

To migrate from Next.js Pages Router to App Router, adapt your project to use the app directory and enable server components by default. You then implement layout.tsx, page.tsx, error.tsx, and loading.tsx files to structure your application using modern patterns.

What are the best practices for Next.js Server Components data fetching?

Next.js Server Components optimize rendering and performance by fetching data directly on the server. You should structure your app using nested layouts and fetch data within these server-driven UI components to ensure scalable and efficient application architecture.

How do I use server actions and middleware in Next.js App Router?

You use server actions and middleware in Next.js App Router by implementing them alongside your page.tsx and layout.tsx files. This approach handles form submissions and request interception within your scalable Next.js project architecture.

When should I use nested layouts in Next.js App Router?

You should use nested layouts in Next.js App Router when building scalable applications that require shared UI across multiple routes. This pattern structures routing and data-fetching efficiently, ensuring consistent layout composition across your project.

Does Next.js App Router require server components by default?

Yes, Next.js App Router requires server components by default to optimize rendering and performance. All components inside the app directory are server-driven unless explicitly marked as client components, ensuring a server-first UI architecture.