next-upgrade

Upgrade Next.js projects by updating dependencies and applying official codemods.

1|2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xrplevm/cosmos-explorer --skill next-upgrade-xrplevm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/xrplevm/cosmos-explorer/tree/main/.agents/skills/next-upgrade
Command: npx skills add https://github.com/xrplevm/cosmos-explorer --skill next-upgrade-xrplevm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Next.js across major versions can be error-prone and time-consuming due to breaking changes, deprecated APIs, and hub of manual steps.

Core Features & Use Cases

  • Incremental upgrades: migrate through major versions step by step using codemods and official guides.
  • Dependency alignment: update next, react, and react-dom together to maintain compatibility.
  • Validation & testing: build and run tests to ensure behavior remains stable after each step.

Quick Start

Run the upgrade workflow by updating Next.js and related peer dependencies, applying codemods, and testing the app.

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 major version safely?

To upgrade Next.js safely, update dependencies like React and TypeScript, apply official codemods to migrate API changes, and validate builds and tests after each step.

What is the best way to migrate breaking changes when upgrading Next.js?

The best way to migrate breaking changes during a Next.js upgrade is applying official codemods that automatically update deprecated APIs and ensure compatibility.

Can I upgrade Next.js from version 12 directly to 15?

Upgrading Next.js from version 12 to 15 requires incremental steps through major versions, applying codemods and validating builds at each stage to ensure stability.

Do I need to update React and React DOM when upgrading Next.js?

Yes, updating Next.js requires aligning React and React DOM dependencies together to maintain compatibility and ensure TypeScript types function correctly.

Why does my Next.js build fail after updating dependencies?

A Next.js build often fails after updating dependencies due to unapplied API changes; running official codemods and validating tests after each migration step resolves these issues.

When should I not use automatic codemods for a Next.js migration?

Avoid relying solely on automatic codemods for a Next.js migration when custom API implementations exist, as manual validation of builds and tests is required after each step.