Use this skill when developing Next.js 16 applications - creating pages, components, layouts, API routes, implementing proxy.ts, adding caching with Cache Components, or refactoring frontend code. This includes working with App Router patterns, Server Components, Server Actions, React 19.2 features, and Tailwind CSS v4.
/plugin marketplace add robinebers/claude-plugins/plugin install robinebers-developing-nextjs-plugins-developing-nextjs@robinebers/claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Write concise, targeted, DRY code using modern React 19 and Next.js 16 patterns.
The middleware.ts file is deprecated. Use proxy.ts instead:
// proxy.ts (at project root or src/)
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function proxy(request: NextRequest) {
// Runs on Node.js runtime (NOT Edge)
return NextResponse.redirect(new URL('/home', request.url))
}
export const config = {
matcher: '/api/:path*',
}
middleware.ts remains backwards compatible, but will be deprecated soonproxy.ts export function is now called proxy instead of middlewareskipMiddlewareUrlNormalize → skipProxyUrlNormalizeAll request APIs must be awaited:
// Next.js 16 - MUST await
const cookieStore = await cookies()
const headersList = await headers()
const draft = await draftMode()
const { slug } = await params
const query = await searchParams
Turbopack is now the default bundler. No --turbopack flag needed.
{
"scripts": {
"dev": "next dev",
"build": "next build"
}
}
--webpack flag to opt out if neededexperimental.turbopack to top-level turbopackNew caching model replacing experimental.ppr:
// next.config.ts
const nextConfig = {
cacheComponents: true,
}
Use "use cache" directive for explicit caching:
async function getData() {
"use cache"
return await fetchData()
}
import { updateTag, revalidateTag, refresh } from 'next/cache'
// updateTag - read-your-writes semantics (Server Actions only)
export async function updateProfile(userId: string) {
await db.update(userId)
updateTag(`user-${userId}`) // User sees changes immediately
}
// revalidateTag - now requires cacheLife profile
revalidateTag('blog-posts', 'max') // SWR behavior with profile
// refresh - refresh uncached data (Server Actions only)
refresh()
useEffectEvent: Extract non-reactive logic from Effects<Activity>: Background rendering with display: none// next.config.ts
const nextConfig = {
reactCompiler: true,
}
Requires: bun add -D babel-plugin-react-compiler
default.js filesnext lint removed - use ESLint directlynext/legacy/image deprecated - use next/imageimages.domains deprecated - use images.remotePatternsminimumCacheTTL: 60s → 4 hoursimageSizes: removed 16 from default arrayqualities: now [75] only by defaultimages.localPatternsapp/ directory) exclusively'use client' only when absolutely neededloading.tsx and error.tsx boundariesnext/image, next/link, next/font@import "tailwindcss" (not v3 directives)@theme in CSS, not tailwind.config.jsbg-linear-to-r (not bg-gradient-to-r)@applyId<'tableName'> for Convex document IDsas const for string literals in unionsWhen encountering unfamiliar Next.js 16 APIs, use Exa and Ref MCP servers (if available) to search examples and official documentation. When unavailable, use web search tools.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.