next-upgrade

Automates Next.js major-version upgrades using official migration guides and codemods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrade Next.js projects to the latest major version by following official migration guides and applying codemods, reducing manual upgrade effort and risk.

Core Features & Use Cases

  • Detects current Next.js version and related dependencies to determine upgrade steps.
  • Applies codemods and dependency updates in an incremental, safe sequence across major version jumps.
  • Validates builds and development workflow after upgrade to ensure compatibility.

Quick Start

Run this skill in the project root to upgrade Next.js to the latest version following official migration pathways.

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

Upgrading Next.js safely involves applying codemods that follow official migration guides to automate dependency updates and type changes. This skill coordinates transforms and validates the build workflow to reduce manual effort across incremental major version jumps.

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

Codemods are automated code transformation tools that apply official migration guide transforms to update code patterns during a Next.js migration. They systematically modify source files to match newer framework APIs, reducing manual upgrade effort and risk.

Can I use this approach to upgrade Next.js with pnpm?

Yes, this approach supports upgrading Next.js projects using either npm or pnpm. The automation parses your package.json, applies codemods, and installs the latest next, react, and react-dom dependencies based on your detected package manager.

How do I handle incremental Next.js major version upgrades like 13 to 14?

Handling incremental Next.js major version upgrades requires following official migration pathways and applying codemods in a safe sequence. The process detects your current version, applies transforms, bumps dependencies, and validates the build after each major jump.

Does the upgrade process update TypeScript types for React?

Yes, the upgrade process updates TypeScript types for React. After applying codemods and installing the latest next, react, and react-dom packages, the automation updates TypeScript types and validates your development workflow to ensure compatibility.

What should I do if my Next.js build fails after a major version upgrade?

If your Next.js build fails after a major version upgrade, you should validate your development workflow and check for compatibility issues. The automation includes build validation steps to ensure codemod transforms and dependency updates are properly applied and compatible.