next-upgrade
Skill4 starsChanged 4 months agoMITView on GitHub
Upgrade Next.js to the current stable 16.x (security floor 16.2.6 — May 2026 release; head 16.2.10 as of Jul 2026) following the official migration guide and codemods. Surfaces the May 2026 security advisory automatically — any project on next < 16.2.6 has unpatched CVEs.
- Installs packages
7 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- STIFLEUR390/kwiktalk-docsedited, first seen Oct 3, 2026
- dorian-akhs/skillsedited, first seen Sep 1, 2026
- ever-works/ever-worksedited, first seen Jul 19, 2026
- georgekhananaev/claude-skills-vaultedited, first seen May 25, 2026
- openai/pluginsedited, first seen May 13, 2026
- zebbern/termstackedited, first seen Apr 16, 2026
Used with
Projects with it also use frontend-design.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- openai/plugins★ 7.3k11% same
- vercel-labs/openreview★ 1.7k15% same
- ever-works/ever-works★ 15715% same
- georgekhananaev/claude-skills-vault★ 2811% same
- zebbern/termstack★ 414% same
- dorian-akhs/skills★ 015% same
- STIFLEUR390/kwiktalk-docs★ 015% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository162 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- skills/compound-engineering/AGENTS.mdAGENTS.md
- skills/trailofbits-security/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- skills/compound-engineering/CLAUDE.mdCLAUDE.md
- skills/trailofbits-security/CLAUDE.mdCLAUDE.md
- app-store-reviewSkill
- advanced-javascriptSkill
- ai-native-uiSkill
- anime-jsSkill
- app-l100Skill
- barba-jsSkill
- brand-guidelinesSkill
- cinematic-web-engineSkill
- codebase-knowledge-graphSkill
- crossplatform-monorepoSkill
- css-first-uiSkill
- design-auditSkill
- design-critiqueSkill
- dev-cycleSkill
- device-hardware-bridgeSkill
- discovery-docSkill
- docxSkill
- edge-intelligenceSkill
- graph-aware-reviewSkill
- linkedin-posterSkill
- local-first-architectureSkill
- modern-build-pipelineSkill
- motion-nativeSkill
- nano-bananaSkill
- playwrightSkill
- pptxSkill
- project-initSkill
- remotionSkill
- sensory-nativeSkill
- spline-3dSkill
- streaming-cacheSkill
- tanstack-ecosystemSkill
- design-taste-frontendSkill
- tauri-desktopSkill
- threejsSkill
- transition-nativeSkill
- ui-design-stackSkill
- visual-nativeSkill
- web-l100Skill
- web-platform-apisSkill
- xlsxSkill
- better-authSkill
- claude-real-videoSkill
- clone-websiteSkill
- css-keyframe-animationsSkill
- design-checkSkill
- design-dnaSkill
- design-polishSkill
- drizzle-neonSkill
- fastlaneSkill
- angular-architectSkill
- api-designerSkill
- architecture-designerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Read package.json. If current next version is < 16.2.6:
- Very specific: line 35
Read package.json for the current next, react, react-dom, and @types/react* versions.
- Very specific: line 39
Use WebFetch on https://nextjs.org/docs/app/guides/upgrading/codemods to confirm the codemod list hasn't changed since this skill was …
- Very specific: line 61
Run each codemod on the relevant directory (typically ./src or ./app).
- Very specific: line 70
If on yarn / pnpm / bun, swap the install command.
- Very specific: line 80
If you have a middleware.ts file at the project root and the codemod missed it, rename to proxy.ts and update the export.
- Very specific: line 101
If npm audit flags transitive deps with CVEs (especially in webpack, postcss, @swc/*), open the audit report and decide whether npm audit …
- Distinctive: line 105
Commit as a single atomic upgrade (don't bundle feature work):
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upgrade Next.js
Upgrade the current project to the current stable Next.js 16.x (16.2.10 as of 2026-07-04 — verify with npm view next dist-tags.latest). The May 2026 release closed 13 security advisories and set the floor: never leave a production project below 16.2.6 (15.x floor 15.5.18; 15.x backport head 15.5.20). The floor is the minimum, not the target — install the head.
Current target (verify at execute time)
| Package | Target | Reason |
next | ^16.2.6 (floor) — install latest 16.x | Security floor from the May 2026 release; head is 16.2.10 (Jul 2026) |
react | ^19.2.7 | Latest stable, paired with Next 16 |
react-dom | ^19.2.7 | Same |
@types/react / @types/react-dom | latest | Always pin to latest types |
16.2.6 is the floor, not the target — run npm view next dist-tags.latest first and install that. (Also current as of Jul 2026: Node 20 is EOL upstream even though Next's minimum is still 20.9+ — prefer Node 22/24; 16.3 is in preview via next@preview.)
Step 0 — Security advisory check (DO THIS FIRST)
Read package.json. If current next version is < 16.2.6:
This upgrade is security-driven. The May 2026 release patches CVE-2026-29057 (HTTP-proxy request smuggling in rewrites), middleware/proxy bypass via segment-prefetch routes, dynamic-route parameter injection bypass, DoS via Cache Components connection exhaustion, SSRF, cache poisoning, and XSS — 13 advisories total. Patching is the only complete mitigation; there are no workarounds for several of them.
State this risk explicitly to the user before proceeding so they understand the upgrade is non-optional.
Step 1 — Detect current state
Read package.json for the current next, react, react-dom, and @types/react* versions. Note the gap between current and target. If skipping a major version (e.g. 14 → 16), upgrade incrementally — 14 → 15 → 16 — running codemods between each step. The tooling assumes one major hop at a time.
Step 2 — Fetch the current upgrade guide
Use WebFetch on https://nextjs.org/docs/app/guides/upgrading/codemods to confirm the codemod list hasn't changed since this skill was written. Also pull the version-specific guides for the upgrade path:
- v16: https://nextjs.org/docs/app/guides/upgrading/version-16
- v15: https://nextjs.org/docs/app/guides/upgrading/version-15
- v14: https://nextjs.org/docs/app/guides/upgrading/version-14
Step 3 — Run codemods
npx @next/codemod@latest <transform> <path>Common transforms (verify list at execute time — Next ships new codemods regularly):
| Transform | Purpose | Introduced |
next-async-request-api | Updates params/searchParams/cookies()/headers() to async | v15 |
next-request-geo-ip | Migrates request.geo and request.ip to geolocation() / ipAddress() | v15 |
next-dynamic-access-named-export | Transforms next/dynamic imports for named exports | v15 |
next-middleware-to-proxy | Renames middleware.ts → proxy.ts and updates exports | v16 |
next-cache-components-migration | Converts unstable_cache → 'use cache' directive (run only if enabling Cache Components) | v16 |
Run each codemod on the relevant directory (typically ./src or ./app). Review the diff per codemod — they're not always 100% accurate on edge cases like ternary destructuring of params.
Step 4 — Bump dependencies
npm install next@latest react@latest react-dom@latest
npm install -D @types/react@latest @types/react-dom@latestIf on yarn / pnpm / bun, swap the install command. Don't pin to a single patch version unless the project requires it — ^16.2.6 keeps you on the LTS line.
Step 5 — Manual config review
Open next.config.{js,ts} and check for:
experimental.ppr: true→ replace with top-levelcacheComponents: true(if migrating to Cache Components — this is opt-in)- Any deprecated
experimental.*flags called out in the v16 upgrade guide images.domains(deprecated since v15) → confirm migrated toimages.remotePatterns
If you have a middleware.ts file at the project root and the codemod missed it, rename to proxy.ts and update the export. The runtime alias still resolves middleware.ts for one major version, but new docs reference proxy.
Step 6 — Build + test
npm run build
npm run dev # smoke-test routing, RSC boundaries, dynamic routesWatch for:
- Hydration mismatch warnings (often surface async API misuse the codemod missed)
- "Cannot read properties of undefined" in
app/**/page.tsx— usuallyparamsnot awaited - Build errors mentioning
route.tsexports — runtime/edge config moved in v15+
Step 7 — Post-upgrade audit
npm audit
npm audit fix # only if changes are limited to dev dependenciesIf npm audit flags transitive deps with CVEs (especially in webpack, postcss, @swc/*), open the audit report and decide whether npm audit fix --force is safe — it can downgrade major versions.
Step 8 — Commit and verify deploy
Commit as a single atomic upgrade (don't bundle feature work):
chore(deps): upgrade Next.js to 16.2.6 LTS (May 2026 security release)
- next 14.x → 16.2.6
- react 18.x → 19.2.6
- ran codemods: next-async-request-api, next-middleware-to-proxy
- closed 13 advisories incl. CVE-2026-29057Then deploy to a preview environment first. The Cache Components and middleware/proxy changes can surface as 5xx in production if the build looked clean but a runtime path was missed — verify against the live preview URL before promoting.
Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

