nextjs-expert

Guide Next.js 14/15 App Router architecture with server/client component patterns.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/giruclawbot/giru-backup --skill nextjs-expert-giruclawbot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-expert
Source: https://github.com/giruclawbot/giru-backup/tree/main/skills/nextjs
Command: npx skills add https://github.com/giruclawbot/giru-backup --skill nextjs-expert-giruclawbot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides production-ready guidance for architecting Next.js 14/15 applications with the App Router, eliminating common mistakes around server/client boundaries, incorrect 'use client' usage, broken caching/revalidation, and fragile routing layouts.

Core Features & Use Cases

  • Server-first architecture: recommendations for making Server Components the default and minimizing client bundles.
  • Routing & Layouts: patterns for page, layout, dynamic, parallel, and intercepting routes.
  • Data fetching & caching: guidance on async params, fetch caching, revalidatePath, revalidateTag, and streaming with Suspense.
  • Server Actions & Route Handlers: secure patterns for server actions, form handling, and API route handlers including streaming/SSE.
  • Error/loading boundaries & auth: conventions for loading.tsx, error.tsx, not-found, middleware protection, and integrating Auth.js/NextAuth.
  • Use Case: Turn a legacy Next.js pages-router codebase into a typed, App Router-based architecture with correct data fetching, revalidation, and minimal client-side JavaScript.

Quick Start

Ask the nextjs-expert to review an App Router route or layout and provide a concise TypeScript implementation plan with recommended file structure and key code snippets.

Frequently Asked Questions about nextjs-expert

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

FAQPage Schema
How do I structure Next.js App Router layouts and dynamic routes with TypeScript?

Structure Next.js App Router layouts and dynamic routes by defining typed page and layout files with async params handling, using parallel and intercepting route patterns to establish a server-first composition for production-grade applications.

What is the correct way to use 'use client' and Server Components in Next.js 14?

The correct way to use 'use client' and Server Components in Next.js 14 is making Server Components the default to minimize client bundles, placing 'use client' only where interactivity is required to maintain a server-first architecture.

How do I implement data fetching and revalidation with revalidatePath and revalidateTag?

Implement data fetching and revalidation by leveraging fetch caching strategies alongside revalidatePath and revalidateTag, using streaming with Suspense to handle loading states and ensure data is precisely updated in Next.js App Router projects.

Does this approach support migrating a legacy Next.js pages-router codebase to the App Router?

Yes, this approach supports migrating a legacy Next.js pages-router codebase to the App Router by transforming it into a typed architecture with correct data fetching, revalidation, and minimal client-side JavaScript for Next.js 14 and 15.

What's the best way to handle authentication and route protection with Next.js middleware?

The best way to handle authentication and route protection with Next.js middleware is integrating Auth.js or NextAuth, applying middleware protection to secure routes, and utilizing error boundaries and not-found conventions for safe routing.

How do I secure Server Actions and Route Handlers in a Next.js App Router project?

Secure Server Actions and Route Handlers in a Next.js App Router project by following secure patterns for form handling and API route handlers, including streaming and Server-Sent Events (SSE) for robust data transmission.