Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Nextjs 16

ASecurity

Use when building Next.js 16 apps — Turbopack, App Router, Cache Components, proxy.ts, v15 migration. Not for stack scaffolding (nextjs-stack) or React SPA (react-expert).

29 stars
0 votes
0 copies
1 views
Added 2/7/2026
developmenttypescriptreactnextjsnodetestingapidatabasesecurityperformance

Works with

cliapimcp

Security Analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned 9/29/2026

$npx -y skills add fusengine/agents --skill nextjs-16 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nextjs 16?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Nextjs 16
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fusengine-nextjs-16/badge)](https://www.skillsdirectory.com/skills/fusengine-nextjs-16)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: nextjs-16
description: Use when building Next.js 16 apps — Turbopack, App Router, Cache Components, proxy.ts, v15 migration. Not for stack scaffolding (nextjs-stack) or React SPA (react-expert).
versions:
  nextjs: 16
  react: 19
user-invocable: true
references: references/installation.md, references/upgrade.md, references/project-structure.md, references/typescript.md, references/styling.md, references/app-router.md, references/routing-advanced.md, references/navigation.md, references/route-segment-config.md, references/pages-router.md, references/server-components.md, references/directives.md, references/react-19.md, references/rendering.md, references/streaming.md, references/runtime.md, references/data-fetching.md, references/forms.md, references/static-generation.md, references/cookies-headers.md, references/caching.md, references/cache-components.md, references/turbopack.md, references/react-compiler.md, references/dynamic-imports.md, references/loading-patterns.md, references/error-handling.md, references/proxy.md, references/middleware-migration.md, references/api-routes.md, references/security.md, references/metadata.md, references/metadata-files.md, references/images.md, references/fonts.md, references/scripts.md, references/third-party.md, references/analytics.md, references/instrumentation.md, references/devtools-mcp.md, references/environment.md, references/deployment.md, references/testing.md, references/config-advanced.md
related-skills: nextjs-i18n, better-auth, tailwindcss-core, solid-nextjs, nextjs-stack, nextjs-server-components, nextjs-tanstack-query
---

<objective>
Covers Next.js 16 core framework mechanics (current stable: 16.3): Turbopack (default bundler; Webpack remains available via the `--webpack` opt-out flag), the App Router (nested layouts, parallel/intercepting routes, file conventions like page.tsx/layout.tsx/loading.tsx/error.tsx/not-found.tsx), Cache Components (`use cache`, `cacheTag()`, `cacheLife()`, `revalidateTag()`), `proxy.ts` (full Node.js runtime, replaces Edge middleware), and React 19 integration (View Transitions, new hooks).

Documents the critical v15→v16 breaking changes: proxy.ts replacing middleware.ts, Turbopack as the default for `next dev`/`next build`, `cacheComponents` replacing the removed `experimental.ppr` flag, required React 19, and async `params`/`searchParams`. This skill covers core framework APIs only — for assembling a full production stack (Prisma, Better Auth, shadcn/ui, Zustand together) use nextjs-stack instead; for a pure React SPA without `next.config.*` use the react-expert skills instead.
</objective>

# Next.js 16 Expert

Production-ready React framework with Server Components, streaming, and Turbopack.

## Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:

1. **fuse-ai-pilot:explore-codebase** - Analyze existing routes, components, and patterns
2. **fuse-ai-pilot:research-expert** - Verify latest Next.js 16 docs via Context7/Exa
3. **mcp__context7__query-docs** - Check breaking changes v15→v16

After implementation, run **fuse-ai-pilot:sniper** for validation.

---

## Overview

### When to Use

- Building new React applications with server-first architecture
- Need Server Components for optimal performance and SEO
- Implementing streaming and progressive rendering
- Migrating from Next.js 14/15 to version 16
- Using proxy.ts for route protection (replaces middleware)
- Leveraging Turbopack for faster development builds

### Why Next.js 16

| Feature | Benefit |
|---------|---------|
| Turbopack default | 2-5x faster builds, 10x faster HMR; Webpack only via `--webpack` opt-out |
| Cache Components | Explicit caching with `use cache` directive |
| proxy.ts | Full Node.js runtime, replaces Edge middleware |
| React Compiler | Automatic memoization, no manual useMemo/useCallback |
| React 19 | View Transitions, useEffectEvent, Activity component |
| App Router | Nested layouts, parallel routes, intercepting routes |

---

## Breaking Changes from v15

### Critical Migration Points

1. **proxy.ts replaces middleware.ts** - Full Node.js runtime, not Edge
2. **Turbopack by default** - `next dev`/`next build` use Turbopack; a custom `webpack` config fails the build unless you migrate it or opt out with `--webpack`
3. **`cacheComponents` + `use cache`** - Replaces `experimental.ppr` / `experimental_ppr` (removed); PPR is the default behavior under `cacheComponents`
4. **React 19 required** - New hooks and View Transitions API
5. **Async params/searchParams** - Must await dynamic route params

### New in 16.1 – 16.3 (see [upgrade.md](references/upgrade.md))

- **16.1** - Turbopack filesystem cache on by default for `next dev`; `next dev --inspect`
- **16.2** - `transitionTypes` prop on `<Link>`, `next start --inspect`, Adapters API stable
- **16.3** - `catchError` + `retry()` error recovery (stable), `next/root-params`, `import.meta.glob`, Turbopack build cache on by default, opt-in Instant Navigations (`partialPrefetching` with `cacheComponents`)

---

## SOLID Architecture

### Module-Based Structure

Pages are thin entry points importing from feature modules:

- `app/page.tsx` → imports from `modules/public/home/`
- `app/dashboard/page.tsx` → imports from `modules/auth/dashboard/`
- `modules/cores/` → Shared services, utilities, configurations

### File Conventions

- **page.tsx** - Route UI component
- **layout.tsx** - Shared UI wrapper
- **loading.tsx** - Suspense loading state
- **error.tsx** - Error boundary
- **not-found.tsx** - 404 handling

---

## Core Concepts

### Server Components (Default)

All components are Server Components by default. Use `'use client'` directive only when needed for interactivity, hooks, or browser APIs.

### Caching Strategy

- **`use cache`** - Mark async functions for caching
- **`cacheTag()`** - Tag cached data for targeted revalidation
- **`cacheLife()`** - Control cache duration (stale, revalidate, expire)
- **`revalidateTag()`** - Invalidate cached data on-demand

### Data Fetching

Server Components fetch data directly. Use `fetch()` with native caching or database queries. No need for `getServerSideProps` or `getStaticProps`.

---

## Reference Guide

| Need | Reference |
|------|-----------|
| Initial setup | [installation.md](references/installation.md), [project-structure.md](references/project-structure.md) |
| Migration v15→v16 | [upgrade.md](references/upgrade.md), [middleware-migration.md](references/middleware-migration.md) |
| Routing | [app-router.md](references/app-router.md), [routing-advanced.md](references/routing-advanced.md) |
| Caching | [caching.md](references/caching.md), [cache-components.md](references/cache-components.md) |
| Server Components | [server-components.md](references/server-components.md), [directives.md](references/directives.md) |
| React 19 features | [react-19.md](references/react-19.md), [react-compiler.md](references/react-compiler.md) |
| Route protection | [proxy.md](references/proxy.md), [security.md](references/security.md) |
| SEO/Metadata | [metadata.md](references/metadata.md), [metadata-files.md](references/metadata-files.md) |
| Forms/Actions | [forms.md](references/forms.md), [data-fetching.md](references/data-fetching.md) |
| Deployment | [deployment.md](references/deployment.md), [environment.md](references/environment.md) |

---

## Best Practices

1. **Server Components first** - Only add `'use client'` when necessary
2. **Colocate data fetching** - Fetch data where it's used
3. **Streaming with Suspense** - Wrap slow components in Suspense
4. **proxy.ts over middleware** - Full Node.js runtime for auth
5. **Cache explicitly** - Use `use cache` for expensive operations
6. **Parallel routes** - Load independent UI sections simultaneously

---

## Performance

### Build Optimization

- **Turbopack** - Incremental compilation, instant HMR
- **React Compiler** - Automatic memoization
- **Tree shaking** - Unused code elimination
- **Code splitting** - Automatic route-based splitting

### Runtime Optimization

- **Streaming** - Progressive HTML rendering
- **Partial hydration** - Only hydrate interactive components
- **Image optimization** - Automatic WebP/AVIF conversion
- **Font optimization** - Zero layout shift with next/font

Attribution

fusenginefusengine
View sourceSee grades on GitHubMore from fusengine →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

285172 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10341 votes
View all in development →