Next.js 16

Implement Next.js 16 caching and server-action patterns with Zod validation.

Updated Nov 4, 2025
One-click install
npx skills add https://github.com/putto11262002/jimmodel --skill next-js-16
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Next.js 16
Source: https://github.com/putto11262002/jimmodel/tree/main/.claude/skills/nextjs-16
Command: npx skills add https://github.com/putto11262002/jimmodel --skill next-js-16

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill captures Next.js 16-specific conventions and critical breaking changes to help developers migrate and adopt modern patterns with reduced friction.

Core Features & Use Cases

  • Documentation lookup for Next.js 16 features and breakages using a dedicated tool.
  • Quick guidance on breaking changes (Async request APIs, parallel routes, proxy.ts, cacheLife requirements, image config).
  • Overview of new features (Cache Components, React 19 patterns) and how to adopt them.
  • Removed features reference and migration tips to avoid deprecated APIs.

Quick Start

Use the mcp__context7__get-library-docs tool with library ID: /vercel/next.js, topic: "caching", tokens: 2000 to retrieve focused Next.js 16 docs, then apply migration steps to your app.

Frequently Asked Questions about Next.js 16

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

FAQPage Schema
What are the breaking changes in Next.js 16 I need to know about?

Next.js 16 introduces breaking changes including async request APIs, proxy.ts replacement, cacheLife requirement updates, and image config modifications. Review the migration guide to identify deprecated patterns in your codebase and plan updates to maintain compatibility.

How do I implement server actions with validation in Next.js 16?

Server actions in Next.js 16 support Zod-based input validation and ActionState-based return types for typed handlers. Define your action with Zod schemas, handle validation errors centrally, and return structured state to enable client-side error handling and type safety.

How does the 'use cache' directive work in Next.js 16?

The 'use cache' directive enables per-component caching with cacheLife profiles in Next.js 16's App Router. Apply it at the component level to define cache duration, then use tag-based or path-based revalidation to invalidate stale data when needed.

Can I migrate my Next.js app to version 16 without rewriting everything?

Migration to Next.js 16 is gradual—adopt new patterns incrementally while removing deprecated APIs like proxy.ts and updating image config. Focus on App Router alignment, server-action patterns, and caching strategies; existing routes can coexist during the transition.

What caching patterns should I use for optimal performance in Next.js 16?

Combine tag-based revalidation for content updates and path-based revalidation for route-specific data. Use cacheLife profiles to set default durations, apply 'use cache' at the component level for granular control, and centralize revalidation logic for maintainability.

How do I replace proxy middleware in Next.js 16?

Next.js 16 deprecates proxy.ts; migrate to proxy-based middleware using the updated middleware APIs. Define routing and request transformation logic in middleware.ts, then reference it in next.config.js for unified request handling across your app.