Build Next.js 16 apps with async route params, Server Components, Cache Components, and Partial Prerendering.
Works with
Covers 25+ documented errors and solutions, including async params migration, parallel routes with required default.js , and \"use cache\" directive patterns
Supports Cache Components with revalidateTag() , updateTag() , and refresh() APIs for opt-in caching and stale-while-revalidate strategies
Includes proxy.ts migration (replaces deprecated middleware.ts), Turbopack produc
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionnextjsExecute the skills CLI command in your project's root directory to begin installation:
Fetches nextjs from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate nextjs. Access via /nextjs in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
697
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
697
stars
Version: Next.js 16.1.1 React Version: 19.2.3 Node.js: 20.9+ Last Verified: 2026-01-09
Focus: Next.js 16 breaking changes and knowledge gaps (December 2024+).
Use this skill when you need:
"use cache" directive (NEW in Next.js 16)revalidateTag(), updateTag(), refresh() (Updated in Next.js 16)params, searchParams, cookies(), headers() now async)useEffectEvent(), React Compiler)Do NOT use this skill for:
cloudflare-nextjs skill insteadclerk-auth, better-auth, or other auth-specific skillscloudflare-d1, drizzle-orm-d1, or database-specific skillstailwind-v4-shadcn skill for Tailwind + shadcn/uizustand-state-management, tanstack-query skillsreact-hook-form-zod skillRelationship with Other Skills:
CRITICAL: Three security vulnerabilities were disclosed in December 2025 affecting Next.js with React Server Components:
| CVE | Severity | Affected | Description |
|---|---|---|---|
| CVE-2025-66478 | CRITICAL (10.0) | 15.x, 16.x | Server Component arbitrary code execution |
| CVE-2025-55184 | HIGH | 13.x-16.x | Denial of Service via malformed request |
| CVE-2025-55183 | MEDIUM | 13.x-16.x | Source code exposure in error responses |
Action Required: Upgrade to Next.js 16.1.1 or later immediately.
npm update next
# Verify: npm list next should show 16.1.1+
References:
New in 16.1:
next dev --inspect supportIMPORTANT: Next.js 16 introduces multiple breaking changes. Read this section carefully if migrating from Next.js 15 or earlier.
Breaking Change: params, searchParams, cookies(), headers(), draftMode() are now async and must be awaited.
Before (Next.js 15):
// ❌ This no longer works in Next.js 16
export default function Page({ params, searchParams }: {
params: { slug: string }
searchParams: { query: string }
}) {
const slug = params.slug // ❌ Error: params is a Promise
const query = searchParams.query // ❌ Error: searchParams is a Promise
return <div>{slug}</div>
}
After (Next.js 16):
// ✅ Correct: await params and searchParams
export default async function Page({ params, searchParams }: {
params: Promise<{ slug: string }>
searchParams: Promise<{ query: string }>
}) {
const { slug } = await params // ✅ Await the promise
const { query } = await searchParams // ✅ Await the promise
return <div>{slug}</div>
}
Applies to:
params in pages, layouts, route handlerssearchParams in pagescookies() from next/headersheaders() from next/headersdraftMode() from next/headersMigration:
// ❌ Before
import { cookies, headers } from 'next/headers'
export function MyComponent() {
const cookieStore = cookies() // ❌ Sync access
const headersList = headers() // ❌ Sync access
}
// ✅ After
import { cookies, headers } from 'next/headers'
export async function MyComponent() {
const cookieStore = await cookies() // ✅ Async access
const headersList = await headers() // ✅ Async access
}
Codemod: Run npx @next/codemod@canary upgrade latest to automatically migrate.
Codemod Limitations (Community-sourced): The official codemod handles ~80% of async API migrations but misses edge cases:
After running the codemod, search for @next-codemod-error comments marking places it couldn't auto-fix.
Manual Migration for Client Components:
// For client components, use React.use() to unwrap promises
'use client';
import { use } from 'react';
export default function ClientComponent({
params
}: {
params: Promise<{ id: string }>
}) {
const { id } = use(params); // Unwrap Promise in client
return <div>{id}</div>;
}
See Template: templates/app-router-async-params.tsx
Breaking Change: middleware.ts is deprecated in Next.js 16. Use proxy.ts instead.
Why the Change: proxy.ts makes the network boundary explicit by running on Node.js runtime (not Edge runtime). This provides better clarity between edge middleware and server-side proxies.
Migration Steps:
middleware.ts → proxy.tsmiddleware → proxymatcher → config.matcher (same syntax)Before (Next.js 15):
// middleware.ts ❌ Deprecated in Next.js 16
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function middleware(request: NextRequest) {
const response = NextResponse.next()
response.headers.set('x-custom-header', 'value')
return response
}
export const config = {
matcher: '/api/:path*',
}
After (Next.js 16):
// proxy.ts ✅ New in Next.js 16
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function proxy(request: NextRequest) {
const response = NextResponse.next()
response.headers.set('x-custom-header', 'value')
return rPrerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jezweb/claude-skills
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
sickn33/antigravity-awesome-skills
leonxlnx/taste-skill
I recommend nextjs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
nextjs reduced setup friction for our internal harness; good balance of opinion and flexibility.
nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
nextjs reduced setup friction for our internal harness; good balance of opinion and flexibility.
Useful defaults in nextjs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
I recommend nextjs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added nextjs from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
Keeps context tight: nextjs is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 38