next-upgrade

Upgrades Next.js projects to the latest version using official migration guides and codemods.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill next-upgrade-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/AarnavBaddam/skills/tree/main/next-upgrade
Command: npx skills add https://github.com/AarnavBaddam/skills --skill next-upgrade-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading Next.js across major versions involves breaking API changes, deprecated features, and dependency coordination that are easy to miss when done manually. This Skill walks through the official migration path so nothing is skipped. ## Core Features & Use Cases - Version Detection and Upgrade Planning: Reads package.json to identify the current Next.js version and determines the incremental migration path for major version jumps. - Automated Codemods: Runs official @next/codemod transforms such as next-async-request-api to apply breaking changes automatically. - Dependency and Type Updates: Upgrades next, react, react-dom, and their TypeScript type packages together, then verifies the result with build and dev server checks. - Use Case: A project on Next.js 13 needs to reach the latest release. The Skill detects the version, applies codemods for each intermediate major release, updates dependencies, and validates the build. ## Quick Start Upgrade my Next.js project to the latest version and run the necessary codemods.

Frequently Asked Questions about next-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Next.js to the latest version?

Check your current version in package.json, run the official codemods with npx @next/codemod@latest for applicable transforms, then install next@latest together with react@latest and react-dom@latest. Finish by running npm run build to catch remaining issues.

How to run Next.js codemods for breaking changes?

Run npx @next/codemod@latest followed by the transform name and target path. Common transforms include next-async-request-api for async Request APIs in v15 and next-dynamic-access-named-export for dynamic imports.

Can I upgrade Next.js across multiple major versions at once?

Upgrade incrementally through each major version, such as 13 to 14 to 15, rather than jumping directly. Each major release has its own migration guide and codemods that must be applied in sequence.

Does upgrading Next.js require updating React as well?

Yes, Next.js and React should be upgraded together as peer dependencies. Install next, react, and react-dom at matching latest versions, and update @types/react and @types/react-dom if the project uses TypeScript.

Why does my build fail after a Next.js upgrade?

Build failures usually come from unapplied breaking changes such as async params in v15, outdated next.config.js options, or removed deprecated features. Review the version-specific upgrade guide and run the relevant codemods to resolve them.