From developing-nextjs
Develops Next.js 16 apps: creates pages/components/layouts/API routes, implements proxy.ts/Cache Components, uses App Router/Server Components/Actions, React 19.2 features, Tailwind CSS v4.
How this skill is triggered — by the user, by Claude, or both
Slash command
/developing-nextjs:developing-nextjsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write concise, targeted, DRY code using modern React 19 and Next.js 16 patterns.
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.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub robinebers/cc-plugins --plugin developing-nextjs