next-upgrade

Upgrade Next.js projects across major versions using official guides and codemods.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/CursorSkills --skill next-upgrade-masermediagroup-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/masermediagroup-stack/CursorSkills/tree/main/skills-bundle/plugins-vercel/eb3b6f19e9ca59b23c88d7cc8dfe609388be0fc7/skills/next-upgrade
Command: npx skills add https://github.com/masermediagroup-stack/CursorSkills --skill next-upgrade-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Next.js across major versions can be error-prone due to breaking changes and config drift. This Skill provides a guided workflow leveraging official migration guides and codemods to minimize manual effort and risk.

Core Features & Use Cases

  • Detect the current Next.js version from package.json and map the required upgrade path across major versions.
  • Fetch official upgrade guides and codemods, then apply changes to the codebase and update dependencies accordingly.
  • Determine incremental upgrade steps for major version jumps, review breaking changes, adjust configurations (next.config.js), and validate with build and test runs.
  • Use cases include upgrading legacy apps to the latest Next.js, migrating app router configuration, and ensuring compatibility with React and TypeScript types.

Quick Start

Identify your current Next.js version in package.json, then follow the upgrade workflow to apply codemods, update dependencies, and 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 to the latest major version without breaking changes?

To upgrade Next.js safely, this Skill detects your current version, fetches official upgrade guides, and applies codemods to automate breaking changes. It then updates dependencies and validates the migration with build and test runs.

Can I migrate the app router configuration when upgrading Next.js across multiple major releases?

Yes, the Skill determines incremental upgrade steps for major version jumps and handles migrating app router configurations. It reviews breaking changes and adjusts next.config.js to ensure compatibility throughout the upgrade path.

What's the best way to apply codemods for a Next.js version migration?

The best way to apply Next.js codemods is through a guided workflow that fetches official codemods, applies them to your codebase, updates dependencies, and runs validation tests to catch any migration errors.

Does this Next.js upgrade workflow handle React and TypeScript type compatibility?

Yes, the Skill ensures compatibility with React and TypeScript types during the upgrade process. It updates dependencies and validates configurations to maintain type safety across major Next.js version migrations.

Why does my Next.js build fail after jumping major versions, and how do I fix it?

Build failures after major version jumps often stem from config drift and breaking changes. The Skill fixes this by reviewing breaking changes, applying codemods, adjusting next.config.js, and validating with build runs.

Do I need to manually detect my current Next.js version before starting the migration?

No, the Skill automatically detects your current Next.js version from package.json and maps the required upgrade path across major versions, eliminating manual version detection before applying codemods and updates.