Skip to content
agents.store
devdevelopment

nextjs-dev

Next.js development plugin. Knowledge base for building modern Next.js 16 applications with App Router, Server/Client Components, data fetching, Cache Components, performance optimization, and the next-devtools-mcp toolchain.

v1.7.1Updated

  • nextjs
  • next.js
  • react
  • app-router
  • server-components
  • typescript
  • dev
  • agents-store
  • testing
  • security
  • authentication
  • forms

Install

Pick your agent for the steps.

Install on Claude Code

  1. 1.Add the marketplace

    /plugin marketplace add Agents-Store/claude-plugins
  2. 2.Install the plugin

    /plugin install nextjs-dev@agents-store-claude-plugins

    Type it inside Claude Code.

Claude Code install docs

What is inside

Skills (18)

  • api-design

    Next.js API design patterns for Route Handlers (app/api/**/route.ts): input validation, response and error shapes, streaming and SSE, webhooks, CORS, versioning, caching GET handlers, and choosing between a Route Handler and a Server Action. Not for form handling with Server Actions (form-handling) or for fetching data in Server Components (data-fetching).

  • api-reference

    Next.js framework API quick reference — key functions, configuration options, and TypeScript types. This skill should be used when the user asks about "Next.js API", "Next.js functions", "next.config options", "generateMetadata API", "Next.js TypeScript types", or needs a quick lookup of Next.js framework APIs.

  • app-router-patterns

    Next.js 16 App Router routing conventions — layouts and templates, route groups, dynamic routes with async params and generateStaticParams, parallel routes (every slot needs default.tsx), intercepting routes for modals, proxy.ts replacing middleware.ts, and the Metadata API. Use when creating, restructuring or migrating routes. Error and loading files belong to error-handling, Route Handlers to api-design.

  • auth-patterns

    Next.js authentication and authorization patterns. Use when the user asks about "authentication in Next.js", "NextAuth.js", "Auth.js", "Better Auth", "middleware auth guards", "protected routes", "session management", "role-based access", "login page", "signup form", "JWT sessions", "cookies auth", or needs guidance on implementing auth in App Router applications.

  • cli-recipes

    Next.js 16 command-line recipes — create-next-app, next dev and next build with Turbopack as the default (--webpack to opt out), next start, the built-in bundle analyzer, next upgrade with codemods, and linting now that next lint is removed. Use when the question is which next command, flag or package script to run. Docker packaging is docker-patterns.

  • data-fetching

    Next.js 16 data fetching and caching in the App Router — Server Component fetching, parallel requests and Suspense streaming, Server Action mutations, revalidation with revalidatePath, revalidateTag (profile argument, the single-argument form is deprecated), updateTag and refresh, ISR, and the use cache directive with cacheLife and cacheTag under cacheComponents. Use when loading, caching or invalidating data. Forms and validation are form-handling.

  • docker-patterns

    Docker configuration patterns for Next.js applications. This skill should be used when the user asks to "dockerize Next.js", "create a Dockerfile for Next.js", "set up Docker for Next.js", "docker compose for Next.js", "build Next.js with Docker", "deploy Next.js in Docker", "Next.js standalone Docker", or needs to containerize a Next.js application for development or production.

  • error-handling

    Next.js error handling patterns and error boundaries. Use when the user asks about "error.tsx", "global-error.tsx", "not-found.tsx", "error boundaries", "error handling", "loading.tsx", "loading states", "fallback UI", "error recovery", "catchError", "retry", or needs guidance on graceful error handling in App Router applications.

  • examples

    Next.js development scenario walkthroughs and code patterns. This skill should be used when the user asks for "Next.js examples", "Next.js project walkthrough", "how to build a dashboard in Next.js", "Next.js e-commerce example", "Next.js code patterns", or needs end-to-end implementation guidance for common Next.js application types.

  • form-handling

    Next.js forms with Server Actions — useActionState, useFormStatus, useOptimistic, zod validation with field errors, progressive enhancement, file uploads and the Form component. Use when building or fixing a form in the App Router. Choosing a Route Handler for an endpoint is api-design, refreshing data after a mutation is data-fetching.

  • mcp-tools

    Next.js DevTools MCP server tools and integration patterns. This skill should be used when the user asks about "next-devtools-mcp", "Next.js MCP tools", "MCP server for Next.js", "runtime diagnostics", "Next.js dev server MCP", or needs to set up or use the official Next.js MCP toolchain for AI-assisted development.

  • performance-optimization

    Next.js 16 performance — next/image and next/font setup, dynamic imports, bundle analysis, the React Compiler (stable in 16, experimental Rust compiler in 16.3), prefetching and Partial Prefetching, third-party scripts and Core Web Vitals (LCP, INP, CLS). Use when a page is slow or heavy. Caching strategy belongs to data-fetching.

  • project-structure

    Next.js project architecture and file organization patterns. Use when the user asks about "Next.js project structure", "folder organization", "feature-based structure", "where to put shared code", "naming conventions", "barrel exports", "modular architecture", "colocation", "route groups for organization", or needs guidance on organizing a scalable Next.js codebase.

  • security-patterns

    Next.js 16 security for production apps — security headers, nonce-based Content Security Policy in proxy.ts, CSRF and allowed origins for Server Actions, CORS for Route Handlers, rate limiting, server-only data access layers, environment variable safety, and keeping next patched against current security advisories. Use when hardening an app. Login and sessions belong to auth-patterns.

  • server-client-components

    Server and Client Components in the Next.js App Router — where to put 'use client', which props can cross the boundary, passing server components as children, context providers, wrapping third-party components, and keeping server-only code out of the client bundle with the server-only and client-only packages. Use when deciding or fixing component boundaries.

  • setup

    Verify Next.js project environment and readiness. This skill should be used when the user asks to "verify Next.js setup", "check Next.js project", "is my Next.js app configured correctly", "test Next.js environment", or needs to confirm their project is ready for development.

  • testing-patterns

    Next.js testing patterns with Vitest and Playwright. Use when the user asks about "testing Next.js", "unit tests", "integration tests", "E2E tests", "Vitest with Next.js", "Playwright", "testing Server Components", "testing Server Actions", "testing Route Handlers", "mocking next/navigation", "mocking next/headers", or needs guidance on test setup and patterns for App Router applications.

  • troubleshoot

    Diagnose Next.js 16 errors — hydration mismatches, 'use client' and server-only errors, build failures such as dynamic server usage, Cache Components errors like blocking-prerender and next-request-in-use-cache, next/image host errors, slow dev or build, and deployment problems. Use when something fails or behaves unexpectedly in a Next.js app.

Agents (1)

  • nextjs-developer

    Next.js development specialist for building modern applications with App Router, Server/Client Components, data fetching, performance optimization, security, authentication, testing, and API design. <example> Context: User wants to build a new page with data fetching user: "I need to create a product listing page that fetches from our API and supports search" assistant: "I'll use the nextjs-developer agent to build the product page with server-side data fetching and search params." <commentary> User needs a new page with data fetching and search — this requires knowledge of App Router patterns, Server Components, and searchParams handling. </commentary> </example> <example> Context: User is getting a hydration error user: "I'm getting a hydration mismatch error on my dashboard page" assistant: "I'll use the nextjs-developer agent to diagnose and fix the hydration error." <commentary> Hydration errors are a common Next.js issue requiring understanding of Server/Client Component boundaries and rendering behavior. </commentary> </example> <example> Context: User wants to optimize their Next.js app performance user: "My Next.js app has a poor Lighthouse score, how can I improve it?" assistant: "I'll use the nextjs-developer agent to analyze and optimize the application performance." <commentary> Performance optimization requires knowledge of next/image, next/font, code splitting, bundle analysis, and rendering strategies. </commentary> </example>

README

Next.js development plugin for the Agents Store marketplace. Comprehensive knowledge base for building production-ready Next.js applications — covers App Router, Server/Client Components, data fetching, caching, performance optimization, project architecture, error handling, forms & validation, security, authentication, API design, and testing.

Type

Technology (Level 1) — knowledge-only, no MCP server bundled.

Skills (18 total)

Core Framework

SkillDescription
setupVerify Next.js project environment and readiness
app-router-patternsApp Router file conventions, routing, layouts, metadata, proxy
server-client-componentsServer vs Client Component patterns, boundaries, composition
data-fetchingData fetching, Server Actions, caching, ISR, streaming, Cache Components (use cache), previous-model route config (revalidate, dynamic) and what replaces it under cacheComponents, pages backed by a headless CMS (webhook revalidation, CMS images)
api-referenceFramework API quick reference (functions, config, types)

Architecture & Patterns

SkillDescription
project-structureProject architecture, folder organization, feature-based structure, naming conventions
error-handlingError boundaries (error.tsx, global-error.tsx), not-found.tsx, loading.tsx, catchError
form-handlingServer Action forms, useActionState, useFormStatus, Zod validation, useOptimistic, file uploads
api-designRoute Handlers, streaming responses (SSE), webhooks, API versioning, CORS

Security & Auth

SkillDescription
security-patternsCSP headers with nonces, CSRF protection, XSS prevention, env var safety, server-only, security headers
auth-patternsAuthentication flows, session management (JWT/cookies), proxy auth guards, RBAC, Better Auth for new projects (with the role caveat), NextAuth v4 and Auth.js v5 for existing ones

Quality & Testing

SkillDescription
testing-patternsVitest + React Testing Library setup, testing Server Actions, Route Handlers, mocking next/navigation, Playwright E2E
performance-optimizationImage/font optimization, code splitting, bundle analysis, Core Web Vitals
troubleshootCommon errors, hydration mismatches, build failures, deployment issues

Tooling & Examples

SkillDescription
mcp-toolsNext.js DevTools MCP server reference (next-devtools-mcp)
cli-recipesCLI commands, scripts, environment variables, Docker deployment
docker-patternsStandalone output, multi-stage Dockerfile, Docker Compose, health checks
examplesEnd-to-end scenario walkthroughs (dashboard app, e-commerce storefront)

Agent

nextjs-developer — Next.js development specialist for building pages, fetching data, implementing auth, designing APIs, handling forms, securing applications, writing tests, debugging issues, and optimizing performance.

Prerequisites

  • A Next.js project (16.x recommended, pinned next@^16.4.5 — earlier 16.x patches miss critical and medium security fixes; 14+ minimum for App Router content)
  • Node.js 22 or 24 LTS recommended (Next.js 16 formally requires >=20.9.0, but Node 20 is end-of-life)
  • For MCP integration: install next-devtools-mcp in your project and run next@^16.4.5 (dev servers before 16.3.8 expose /_next/mcp without an origin check)

Installation

Install as a Claude Code plugin from the Agents Store marketplace.

What's New in v1.7.0

New 16.4 features, each added to the skill that owns the topic:

  • Static guarantees and staged prefetching — ensureStatic segment config ('shell', 'prefetch', 'navigation') and prefetch() / navigation() from next/cache in the Cache Components reference of data-fetching; api-reference lists the two functions
  • Agent upgrades (experimental) — next upgrade --agent with its three policies, experimental.agentUpgrade reminders and experimental.agentFeedback in cli-recipes, summarised in mcp-tools
  • Turbopack experiments (experimental) — turbopackGc, turbopackLazyDynamicImports, turbopackPluginRuntimeStrategy: 'workerThreads' and turbopackAdditionalRoots in performance-optimization; next analyze snapshots and export in cli-recipes
  • React 19.3 — use(browser()) and Fragment Refs in server-client-components
  • Route Handler compression — next start compresses handler responses since 16.4.6 (api-design)

What's New in v1.6.9

Aligned with next@16.4.6 and the October and November 2026 security releases:

  • Version floor — recommended range is now next@^16.4.5 (15.5.x: 15.5.29); 16.4.1 fixed two critical RCEs (use cache typed arrays, SVG in Image Optimization) and a Server Actions DoS, 16.4.5 seven medium issues (use cache leaks across tenants, users and route params, shell cache poisoning, SVG rejection bypass, an Edge cookie header leak)
  • Cache Components is recommended for every app — new create-next-app projects have it on by default and it becomes the default in Next.js 17; the previous-model route config examples in this plugin still apply only to apps that have not enabled it
  • Removed option — unstable_eager is gone; per-link prefetching uses <Link prefetch={true}>
  • Agent skills — the list now covers next-bundle-optimizer and next-partial-prefetching-optimizer

What's New in v1.5.0

Aligned with next@16.3.8 and the September 2026 security release:

  • Version floor — recommended range is next@^16.3.8; the 16.3.x patches since 16.3.0 carry critical, high and medium security fixes (see security-patterns and setup)
  • Previous-model route config is now labelled — every export const revalidate / dynamic / dynamicParams / fetchCache example states that it works only without cacheComponents; with cacheComponents: true those options are removed and 'use cache' + cacheLife() / cacheTag() replaces them (migration table in data-fetching/references/cache-components.md)
  • Troubleshooting — "Dynamic server usage" under Cache Components is fixed with <Suspense> around the runtime-API reader, not force-dynamic
  • Caching details — fetch tags need cache: 'force-cache'; 'use cache: private' is browser-only and never part of the static shell; experimental.cachedNavigations is automatic under cacheComponents
  • Auth — Auth.js now lives under Better Auth: a new "Better Auth (recommended for new projects)" section; Auth.js v5 stays documented as beta, maintenance-mode
  • New 16.3 surface — io() from next/cache, the instant / prefetch segment configs, per-link prefetching, view transitions, and the first-party agent skills (next-dev-loop, next-cache-components-adoption, next-cache-components-optimizer, next-partial-prefetching-adoption)
  • Tooling — Vitest 5 requirements (Node >= 22.12, Vite >= 6.4), experimental Rust React Compiler caveats, instant() E2E helper needs baseURL and exposeTestingApiInProductionBuild against next start

What's New in v1.4.0

Full alignment with Next.js 16.3:

  • proxy.ts — middleware.ts is deprecated; all routing, auth, and CSP examples now use the proxy convention
  • Stable error APIs — retry prop and catchError from next/error (formerly unstable_*)
  • Caching APIs — revalidateTag(tag, profile) (single-arg form deprecated), new updateTag() and refresh() Server Action APIs, cacheComponents: true prerequisite for use cache, new Cache Components / Instant Navigations reference
  • next lint removal — linting recipes migrated to the ESLint CLI / Biome; next typegen for CI type checks
  • Turbopack default — dev and build default to Turbopack; bundle analysis via next experimental-analyze
  • next-devtools-mcp 0.4.0 — 4-tool surface (nextjs_index, nextjs_call, nextjs_docs, browser_eval gateways); init/upgrade_nextjs_16/enable_cache_components removed
  • Next 16 image defaults, parallel-route default.tsx requirement, Node 20.9+ / TS 5.1+ minimums, Tailwind v4 and zod v4 example updates

What's New in v1.3.0

Added 7 new skills covering production-ready patterns:

  • Project structure — scalable folder organization for small to large apps
  • Error handling — error boundaries, recovery, and loading states
  • Form handling — Server Action forms with validation and optimistic UI
  • Security — CSP, CSRF, XSS prevention, environment variable safety
  • Authentication — session management, proxy guards, RBAC
  • API design — Route Handlers, streaming, webhooks
  • Testing — Vitest unit tests, Playwright E2E, mocking patterns
  • next-devtools-mcp — Vercel's official MCP server for Next.js runtime diagnostics
  • Next.js Documentation — Official framework documentation
  • Better Auth — Authentication library for new Next.js projects (Auth.js is now part of Better Auth)
  • Auth.js — Existing Auth.js v5 projects; migration guide to Better Auth
  • Vitest — Unit testing framework
  • Playwright — E2E testing framework