Marketplace next-upgrade
Upgrade Next.js to the latest version following official migration guides and codemods
install
source · Clone the upstream repo
git clone https://github.com/aiskillstore/marketplace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/vercel-labs/next-upgrade" ~/.claude/skills/aiskillstore-marketplace-next-upgrade && rm -rf "$T"
manifest:
skills/vercel-labs/next-upgrade/SKILL.mdsource content
Upgrade Next.js
Upgrade the current project to the latest Next.js version following official migration guides.
Instructions
-
Detect current version: Read
to identify the current Next.js version and related dependencies (React, React DOM, etc.)package.json -
Fetch the latest upgrade guide: Use WebFetch to get the official upgrade documentation:
- Codemods: https://nextjs.org/docs/app/building-your-application/upgrading/codemods
- Version-specific guides (adjust version as needed):
-
Determine upgrade path: Based on current version, identify which migration steps apply. For major version jumps, upgrade incrementally (e.g., 13 → 14 → 15).
-
Run codemods first: Next.js provides codemods to automate breaking changes:
npx @next/codemod@latest <transform> <path>Common transforms:
- Updates async Request APIs (v15)next-async-request-api
- Migrates geo/ip properties (v15)next-request-geo-ip
- Transforms dynamic imports (v15)next-dynamic-access-named-export
-
Update dependencies: Upgrade Next.js and peer dependencies together:
npm install next@latest react@latest react-dom@latest -
Review breaking changes: Check the upgrade guide for manual changes needed:
- API changes (e.g., async params in v15)
- Configuration changes in
next.config.js - Deprecated features being removed
-
Update TypeScript types (if applicable):
npm install @types/react@latest @types/react-dom@latest -
Test the upgrade:
- Run
to check for build errorsnpm run build - Run
and test key functionalitynpm run dev
- Run