From nextjs-16
Next.js 16 App Router development guide with latest patterns (params Promise, PageProps helpers, useActionState, Server Components, Cache Components, Proxy). Use when creating pages, layouts, routes, Server Actions, or working with Next.js 16 projects.
npx claudepluginhub window-ook/claude-code-lab --plugin nextjs-16This skill uses the workspace's default tool permissions.
**Version:** 16.1.2 (Jan 2026)
references/01-project-structure.mdreferences/02-layouts-and-pages.mdreferences/03-linking-and-navigating.mdreferences/04-server-and-client-components.mdreferences/05-cache-components.mdreferences/06-fetching-data.mdreferences/07-updating-data.mdreferences/08-caching-and-revalidating.mdreferences/09-error-handling.mdreferences/10-css.mdreferences/11-image-optimization.mdreferences/12-font-optimization.mdreferences/13-metadata-and-og-images.mdreferences/14-route-handlers.mdreferences/15-proxy.mdreferences/16-deploying.mdreferences/17-upgrading.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Compresses source documents into lossless, LLM-optimized distillates preserving all facts and relationships. Use for 'distill documents' or 'create distillate' requests.
Version: 16.1.2 (Jan 2026)
Next.js 16 App Router κΈ°λ° κ°λ° μ μ΅μ ν¨ν΄κ³Ό λ² μ€νΈ νλν°μ€λ₯Ό μ μ©ν©λλ€. params Promise μ²λ¦¬, PageProps ν¬νΌ, useActionState, Server Components, Cache Components λ± Next.js 16μ ν΅μ¬ λ³κ²½μ¬νμ μ¬λ°λ₯΄κ² ꡬννλλ‘ μλ΄ν©λλ€.
Doc Source: Official Next.js documentation
// β WRONG
export default function Page({ params }: { params: { slug: string } }) {
return <h1>{params.slug}</h1>;
}
// β
CORRECT
export default async function Page(props: PageProps<'/blog/[slug]'>) {
const { slug } = await props.params;
return <h1>{slug}</h1>;
}
// β DEPRECATED
import { useFormState } from 'react-dom';
// β
CORRECT
import { useActionState } from 'react-dom';
// β WRONG - Form actions can't return data
export async function submitForm(formData: FormData) {
'use server';
return { success: true }; // Type error!
}
// β
CORRECT
export async function submitForm(formData: FormData) {
'use server';
await saveData(formData);
revalidatePath('/posts');
}
any Types// β WRONG
const data:any = await fetch(...);
// β
CORRECT
const data:Post[] = await fetch(...).then(r => r.json());
// β
Type-safe with auto-completion
export default async function Page(props: PageProps<'/blog/[slug]'>) {
const { slug } = await props.params;
}
// β WRONG - Dynamic data without caching
export default async function Page() {
const posts = await db.posts.findMany() // Fetched on every request
return <PostList posts={posts}>;
}
// β
CORRECT - Cache with 'use cache'
'use cache'
import {cacheLife} from 'next/cache'
export default async function Page() {
cacheLife('hours') // Cache for 1 hour
const posts = await db.posts.findMany()
return <PostList posts={posts}>;
}
// app/about/page.tsx
export const metaData = {
title: 'About',
description: 'About Page',
};
export default function Page() {
return <h1>About</h1>;
}
Starting new project? β references/01-project-structure.md
(marketing), private folders _libCreating pages/layouts? β references/02-layouts-and-pages.md
[slug], catch-all [...slug]@modal, intercepting routes (.)Implementing links? β references/03-linking-and-navigating.md
<Link> component usageloading.tsxuseLinkStatus hook for slow networksChoosing component type? β references/04-server-and-client-components.md
'use client' directive placementCaching dynamic content? β references/05-cache-components.md
'use cache' directivecacheLife, cacheTag APIsFetching data? β references/06-fetching-data.md
fetch with next.revalidate, next.tagsUpdating data? β references/07-updating-data.md
'use server'useActionStaterevalidatePath, revalidateTagCaching strategy? β references/08-caching-and-revalidating.md
unstable_cache, Data Cache, Full Route CacheHandling errors? β references/09-error-handling.md
error.tsx, global-error.tsxreset functionnotFound(), not-found.tsxSetting up CSS? β references/10-css.md
Optimizing images? β references/11-image-optimization.md
<Image> component, sizes, prioritynext.config.js domainsOptimizing fonts? β references/12-font-optimization.md
next/font/google, next/font/localAdding metadata? β references/13-metadata-and-og-images.md
generateMetadata, Open Graph imagesopengraph-image.tsx conventionCreating API endpoints? β references/14-route-handlers.md
route.ts GET, POST, PUT, DELETESetting up proxy? β references/15-proxy.md
next.config.js rewritesDeploying? β references/16-deploying.md
Upgrading Next.js? β references/17-upgrading.md