next-upgrade

Automate Next.js major version upgrades with codemods and dependency updates.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/miklosme/nextjs-ai-bootstrap --skill next-upgrade-miklosme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/miklosme/nextjs-ai-bootstrap/tree/main/.agents/skills/next-upgrade
Command: npx skills add https://github.com/miklosme/nextjs-ai-bootstrap --skill next-upgrade-miklosme

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Next.js across major releases is error-prone and time-consuming, often requiring manual code changes and compatibility checks.

Core Features & Use Cases

  • Codemod-assisted migrations to automate breaking changes across major versions.
  • Automated dependency updates for next, react, and related peer dependencies.
  • Migration-Guide alignment and validation through build and test verification.

Quick Start

Run the upgrade workflow on your Next.js project to bring it to the latest compatible version.

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?

You can upgrade Next.js safely by running an automated workflow that detects your current version, applies official codemods for breaking changes, updates peer dependencies, and validates the build.

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

Codemods are automated code transformation tools used during Next.js migration to automatically fix breaking changes across major releases, reducing manual code modifications and human error.

Can I automate dependency updates when upgrading Next.js?

Yes, the upgrade process automates dependency updates for Next.js, React, and related peer dependencies by detecting current versions in package.json and synchronizing them with the latest compatible releases.

Does the Next.js upgrade process validate builds after applying codemods?

Yes, after applying codemods and updating dependencies, the process validates the project by running build and development server checks to ensure the Next.js migration completed without errors.

What is the best way to handle breaking changes during a Next.js version upgrade?

The best way to handle breaking changes during a Next.js version upgrade is using codemod-assisted migrations aligned with official guides, which automatically apply necessary code transformations and verify build stability.

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

Your Next.js build may fail after a major version upgrade due to unhandled breaking changes or incompatible peer dependencies, which automated codemods and synchronized dependency updates are designed to resolve.