next-upgrade

Upgrade Next.js versions by running codemods and updating dependencies.

Updated May 16, 2026
One-click install
npx skills add https://github.com/MohammedHTahir/vibe-coding-platform --skill next-upgrade-mohammedhtahir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/MohammedHTahir/vibe-coding-platform/tree/main/.kiro/vercel-plugin/skills/next-upgrade
Command: npx skills add https://github.com/MohammedHTahir/vibe-coding-platform --skill next-upgrade-mohammedhtahir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of upgrading Next.js versions while handling breaking changes and required migrations without missing critical steps.

Core Features & Use Cases

  • Detects your current setup: Reads package.json to determine the existing Next.js (and related) versions.
  • Guides the right migration path: Chooses the correct upgrade steps for major version jumps using official upgrade guides.
  • Runs Next.js codemods first: Suggests and applies the appropriate codemods (via npx @next/codemod) before updating dependencies.
  • Validates the result: Recommends building and running the app to catch migration errors early.

Use case example: When moving from an older Next.js release to a newer major version, run the codemods and then upgrade Next.js/React dependencies, following the version-specific guide to resolve manual breaking changes.

Quick Start

Tell the AI: "Upgrade this project to the latest Next.js version and run the recommended codemods, then verify the build."

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 without missing breaking changes?

To upgrade Next.js safely, read package.json for current versions, apply official codemod transforms first, update Next.js and React dependencies, then run build and runtime checks to catch migration errors.

What is the best way to use codemods for a Next.js migration?

The best way to use Next.js codemods is running npx @next/codemod transforms before updating package dependencies, ensuring automated breaking changes are resolved first, followed by manual fixes from the version-specific migration guide.

When do I need to run codemods during a Next.js version upgrade?

You need to run codemods during any major or incremental Next.js release upgrade to automatically handle breaking changes and apply required migrations before you update dependencies in package.json.

Can I upgrade Next.js and React dependencies at the same time?

Yes, you can upgrade Next.js and React dependencies together, but you must align them with official migration guidance and run @next/codemod transforms first to ensure next.config and package dependencies match the target version.

Why does my Next.js build fail after updating package.json to a new version?

A Next.js build fails after updating package.json when required codemods are skipped or next.config is misaligned, making it necessary to run version-specific migration steps and codemod transforms before validating the build.

Does the Next.js upgrade process require manual changes after running codemods?

Yes, the Next.js upgrade process requires manual changes after running codemods, because you must resolve remaining breaking changes from the official upgrade guide and perform build and runtime checks to verify the migration.