
Next Upgrade
Bump a Next.js app to the latest release using official upgrade guides, codemods, and coordinated React peer dependency updates.
Overview
Next Upgrade is an agent skill for the Operate phase that upgrades Next.js projects using official guides, codemods, and dependency bumps.
Install
npx skills add https://github.com/vercel-labs/next-skills --skill next-upgradeWhat is this skill?
- Reads package.json to detect current Next, React, and related versions
- Fetches official Next.js upgrading docs and version-specific guides (14, 15, 16)
- Runs @next/codemod transforms such as next-async-request-api and next-request-geo-ip
- Recommends incremental major jumps (e.g. 13 → 14 → 15) for large gaps
- Optional argument-hint target-version for directed upgrades
- References version-specific guides for Next 14, 15, and 16
- Lists multiple @next/codemod transforms including next-async-request-api
Adoption & trust: 23k installs on skills.sh; 919 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are behind on Next.js and fear breaking App Router, async request APIs, or React peer versions without an ordered migration path.
Who is it for?
Indie builders maintaining a Next.js App Router repo who want guide-linked, codemod-first upgrades instead of manual changelog spelunking.
Skip if: Greenfield scaffolding, non-Next frameworks, or upgrades when you refuse to run codemods or read breaking-change notes.
When should I use this skill?
Upgrade Next.js to the latest version following official migration guides and codemods; optional target-version argument.
What do I get? / Deliverables
After the skill runs, codemods and package.json reflect the target Next release aligned with official upgrade steps you can verify in CI and staging.
- Updated Next.js, React, and peer dependencies in package.json
- Codemod-applied source tree per applicable official transforms
Recommended Skills
Journey fit
Framework upgrades are ongoing maintenance after ship—operate is where solo builders keep stacks current without derailing feature work. Iterate covers dependency refreshes and incremental migrations that keep the app deployable on modern Next APIs.
How it compares
Structured upgrade runbook tied to nextjs.org docs—not a generic npm audit fixer.
Common Questions / FAQ
Who is next-upgrade for?
Solo and indie developers on Next.js who need repeatable major and minor upgrades with official codemods and peer dependency alignment.
When should I use next-upgrade?
In Operate iterate when Next or React versions lag, before deploying to a new hosting runtime, or when official migration guides reference your current major.
Is next-upgrade safe to install?
Check Security Audits on this page; the skill runs shell and network steps that modify dependencies—review diffs and test in a branch.
SKILL.md
READMESKILL.md - Next Upgrade
# Upgrade Next.js Upgrade the current project to the latest Next.js version following official migration guides. ## Instructions 1. **Detect current version**: Read `package.json` to identify the current Next.js version and related dependencies (React, React DOM, etc.) 2. **Fetch the latest upgrade guide**: Use WebFetch to get the official upgrade documentation: - Codemods: https://nextjs.org/docs/app/guides/upgrading/codemods - Version-specific guides (adjust version as needed): - https://nextjs.org/docs/app/guides/upgrading/version-16 - https://nextjs.org/docs/app/guides/upgrading/version-15 - https://nextjs.org/docs/app/guides/upgrading/version-14 3. **Determine upgrade path**: Based on current version, identify which migration steps apply. For major version jumps, upgrade incrementally (e.g., 13 → 14 → 15). 4. **Run codemods first**: Next.js provides codemods to automate breaking changes: ```bash npx @next/codemod@latest <transform> <path> ``` Common transforms: - `next-async-request-api` - Updates async Request APIs (v15) - `next-request-geo-ip` - Migrates geo/ip properties (v15) - `next-dynamic-access-named-export` - Transforms dynamic imports (v15) 5. **Update dependencies**: Upgrade Next.js and peer dependencies together: ```bash npm install next@latest react@latest react-dom@latest ``` 6. **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 7. **Update TypeScript types** (if applicable): ```bash npm install @types/react@latest @types/react-dom@latest ``` 8. **Test the upgrade**: - Run `npm run build` to check for build errors - Run `npm run dev` and test key functionality