next-upgrade

Upgrade Next.js applications across major versions using codemods and build validation.

Updated May 18, 2026
One-click install
npx skills add https://github.com/yogaprasetya22/mmorpg --skill next-upgrade-yogaprasetya22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/yogaprasetya22/mmorpg/tree/main/frontend/.agents/skills/next-upgrade
Command: npx skills add https://github.com/yogaprasetya22/mmorpg --skill next-upgrade-yogaprasetya22

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of keeping a Next.js project up to date without breaking builds or running apps due to version-specific breaking changes.

Core Features & Use Cases

  • Version discovery: Reads your package.json to determine the current Next.js version and related React dependencies.
  • Guided migration: Selects the correct upgrade documentation and migration steps for the version jump.
  • Codemod-driven modernization: Runs the official Next.js codemods to automate common breaking changes, then updates dependencies and manually-reviewed config.
  • Use Case: Upgrading a production app from Next.js 14 to 16 to fix deprecated APIs, align async/server behaviors, and restore clean npm run build results across environments.

Quick Start

Ask the AI to upgrade your project to Next.js target version by detecting the current version, applying the appropriate codemods, updating dependencies, and verifying the upgrade with a fresh build and dev run.

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 a newer version without breaking my build?

To upgrade Next.js safely, the Skill reads your package.json for current versions, applies official @next/codemod transforms to fix breaking changes, updates dependencies, and validates the upgrade with a fresh build and dev run.

What are codemods and how do they help with Next.js migration?

Codemods are automated code transformation tools that apply official Next.js migration steps to fix deprecated APIs and align async server behaviors, preventing breaking-change regressions during major version jumps.

Can I use this to migrate a Next.js project to the App Router?

Yes, the Skill supports App Router migration by running appropriate @next/codemod transforms and aligning React, React DOM, and Next.js peer packages for projects undergoing major version jumps.

What's the best way to handle React and React DOM dependency alignment during a Next.js upgrade?

The Skill handles dependency alignment by reading your current versions, selecting the correct official upgrade guide, running codemods, and updating Next.js and peer packages to restore clean npm run build results.

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

Builds fail due to version-specific breaking changes from deprecated APIs or misaligned peer dependencies; the Skill resolves this by applying official @next/codemod transforms and updating dependencies before validating with a build.