next-upgrade

Upgrade Next.js projects to the latest release with codemods and dependency updates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the risk and guesswork from upgrading a Next.js application by guiding the migration through the official version notes, codemods, dependency updates, and verification steps.

Core Features & Use Cases

  • Version Detection: Reads the project manifest to identify the current Next.js, React, and React DOM versions.
  • Guided Migration: Selects the right official upgrade path for major releases such as 13, 14, 15, and 16.
  • Automated Breaking-Change Cleanup: Applies relevant codemods before manual adjustments to reduce upgrade friction.
  • Validation and Testing: Confirms the upgrade with build and runtime checks so the app remains functional after migration.

Quick Start

Use the next-upgrade skill to migrate this Next.js project to the latest compatible version and update any required codemods, dependencies, and configuration changes.

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 my App Router application?

Upgrading Next.js requires inspecting package versions, applying automated codemods for breaking changes, aligning peer dependencies like React, and running post-upgrade build validations to ensure your App Router application remains functional.

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

Codemods are automated code transformation tools that apply official migration fixes before manual adjustments, reducing friction and resolving breaking changes automatically when you upgrade Next.js across major releases like 13, 14, 15, and 16.

Can I use an automated process to jump major versions in a Next.js and React project?

Yes, you can upgrade Next.js across major version jumps by following a guided migration path that selects the official upgrade route, updates React and React DOM peer dependencies, and executes necessary codemods for the target release.

How do I validate a Next.js project after a major version upgrade?

You validate a Next.js upgrade by running post-migration build checks and runtime tests, confirming that the App Router and core dependencies remain functional and that no breaking changes were missed during the codemod execution phase.

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

The best way to handle peer dependency alignment during a Next.js upgrade is to inspect the project manifest for current React versions and update them alongside Next.js to match the official requirements for your target release.