next-upgrade

Upgrade Next.js App Router projects with codemods and build validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the risk and effort of upgrading a Next.js app across breaking changes by guiding you through the correct migration order and automated codemods.

Core Features & Use Cases

  • Version-aware upgrade planning: Reads package.json to identify the current Next.js version and selects the applicable migration steps, including incremental upgrades across major versions.
  • Guided codemods automation: Fetches official Next.js upgrading guidance and suggests codemods to automate common breaking changes for specific versions.
  • Dependency and testing verification: Updates Next.js and related React dependencies together, then validates the result with build and runtime checks.

Use Case: You’re moving a production App Router project from an older Next.js major version to the latest release and want confidence that breaking changes (like API shifts) are handled before deployment.

Quick Start

Ask the AI to upgrade your project to the latest Next.js version using the official migration guides and Next codemods, then verify the upgrade with a 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 the latest version without breaking changes?

Upgrading Next.js safely requires reading package.json for current versions, selecting the correct official migration guide, running @next/codemod transforms to automate breaking changes, updating React dependencies, and validating with build and runtime tests.

What are Next.js codemods and when do I need them for a migration?

Next.js codemods are automated code transformation tools provided by the framework to handle common breaking changes during a major version upgrade, needed when migrating App Router projects across major versions to ensure API shifts are resolved before deployment.

Can I use codemods to upgrade a Next.js App Router project across multiple major versions?

Yes, the upgrade process supports incremental upgrades across major versions for App Router projects by selecting the correct official upgrade guide for each step and running the corresponding @next/codemod transforms to minimize breaking-change risk.

What is the best way to handle dependency alignment when upgrading Next.js and React?

The best way to handle dependency alignment is updating Next.js and related React dependencies together based on the official migration guide, then verifying the alignment by performing build and runtime checks to catch any compatibility issues.

How do I verify a Next.js upgrade after running codemods and updating dependencies?

You verify a Next.js upgrade by performing build and runtime tests after running @next/codemod transforms and updating dependencies, ensuring the production App Router project functions correctly before deployment.