next-upgrade

Automate Next.js major version upgrades with official codemods and build validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Next.js across major versions can be risky and time-consuming; this Skill guides you step-by-step to keep dependencies in sync, apply codemods, and verify builds.

Core Features & Use Cases

  • Detect current Next.js and related dependencies from package.json and lockfiles.
  • Apply official codemods and upgrade steps to migrate across major versions incrementally.
  • Validate the upgrade by building and running the app to ensure functionality.

Quick Start

Start by following the upgrade workflow to migrate your project to the latest Next.js version using the official migration guides.

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, you can automate the process using codemods and official migration guides that incrementally update dependencies, apply code transformations, and validate the build to ensure functionality across major versions.

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

Codemods are automated code transformation tools that help with Next.js migration by systematically updating deprecated syntax and APIs according to official migration guides, reducing manual refactoring effort and risk of errors during major version upgrades.

Can I use codemods to migrate a Next.js project from version 13 to 15?

Yes, you can use codemods to migrate a Next.js project incrementally across major versions, such as from 13 to 14 to 15. The process involves detecting current dependencies, applying official upgrade steps, and validating the build.

What is the best way to update dependencies when upgrading Next.js?

The best way to update dependencies during a Next.js upgrade is to read package.json to detect current versions, apply official codemods for code transformations, upgrade dependencies with npm, and validate the application by building and running it.

Why does my Next.js build fail after a major version upgrade?

A Next.js build may fail after a major version upgrade if dependencies are out of sync or codemods were not fully applied. Validating the build and running the app post-upgrade helps identify remaining issues from the migration process.

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

When upgrading Next.js, related dependencies including TypeScript and React must be kept in sync. The upgrade workflow detects current versions from package.json and lockfiles to ensure all related packages are updated correctly.