nextjs

Guide Next.js 16 App Router migration with caching and Server Components.

54|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/dennislee928/Ethic-Latex --skill nextjs-dennislee928
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/dennislee928/Ethic-Latex/tree/main/.claude/skills/nextjs
Command: npx skills add https://github.com/dennislee928/Ethic-Latex --skill nextjs-dennislee928

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and templates (resource) and rules (resource) components.

What problem does it solve?

This Skill provides production-ready patterns and solutions for Next.js 16 App Router, helping developers avoid common pitfalls and leverage new features efficiently.

Core Features & Use Cases

  • Next.js 16 Migration: Guides users through breaking changes like async route parameters and middleware.ts to proxy.ts migration.
  • Caching: Implements "use cache" directive, revalidateTag(), updateTag(), and refresh() for advanced caching strategies.
  • Use Case: A developer migrating a Next.js 15 application to Next.js 16 can use this Skill to automatically identify and fix breaking changes, ensuring a smooth transition and preventing runtime errors.

Quick Start

Use the nextjs skill to help me migrate my Next.js 15 app to Next.js 16, focusing on async route parameters and caching.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I migrate my Next.js 15 app to Next.js 16 App Router?

To migrate to the Next.js 16 App Router, you must address breaking changes like async route parameters and migrate middleware.ts to proxy.ts. This process requires updating route handlers to await dynamic parameters to prevent runtime errors.

What is the use cache directive in Next.js 16?

The "use cache" directive in Next.js 16 is an advanced caching mechanism for Server Components. It works alongside functions like revalidateTag(), updateTag(), and refresh() to provide granular control over data caching and tag invalidation strategies.

Do I need to update route parameters to async for Next.js 16?

Yes, Next.js 16 enforces async route parameters as a breaking change. You must update your dynamic route handlers and pages to asynchronously await their params and searchParams properties, ensuring data fetching resolves correctly before rendering.

Does Next.js 16 work with React 19.2 Server Components and Actions?

Yes, Next.js 16 App Router fully integrates with React 19.2 Server Components and Server Actions. You can leverage these features alongside Turbopack optimization to build production-ready applications with direct server-side data mutation and rendering patterns.

Why does my middleware.ts throw errors after upgrading to Next.js 16?

Your middleware.ts throws errors because Next.js 16 requires migrating middleware functionality to proxy.ts. This breaking change restructures request interception, meaning you must rename and adapt your existing middleware logic to the new proxy module configuration.

What are the parallel route requirements in Next.js 16?

Parallel routes in Next.js 16 require specific structural configurations to render simultaneously within the App Router. Using them correctly involves defining parallel route segments and handling their loading and error states to ensure smooth concurrent rendering transitions.