next-upgrade

Upgrade Next.js projects via official migration steps and codemods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates upgrading Next.js to the latest version by following official migration guides and codemods, reducing manual steps and errors.

Core Features & Use Cases

  • Detect current Next.js and related dependency versions from package.json to plan the upgrade.
  • Fetch official upgrade guides and codemods to automate repetitive migrations.
  • Apply codemods and update dependencies iteratively for major and minor version jumps.
  • Validate the upgrade by building and testing the project to ensure compatibility.

Quick Start

Locate the current Next.js version in package.json and apply the recommended codemods and dependency updates.

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 official migration steps and codemods iteratively. This Skill reads package.json, fetches upgrade guides, runs npx @next/codemod, updates next/react-dom packages, and validates build compatibility to prevent errors.

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

Codemods are automated code transformation scripts that apply repetitive structural changes required by new framework versions. This Skill runs npx @next/codemod to handle these migrations automatically, reducing manual codebase updates and errors.

Can I use this to upgrade across multiple major Next.js versions at once?

Yes, this Skill supports both incremental and major version upgrades for Next.js. It sequences dependency checks and codemod applications iteratively to bridge version gaps, ensuring your project reaches the latest framework version safely.

Does this upgrade process update both next and react-dom packages?

Yes, the upgrade process updates both next and react-dom packages. It reads current versions from package.json, fetches official upgrade guides, applies codemods, and updates these dependencies to required versions before verifying compatibility.

How do I validate my Next.js build after applying migration codemods?

Validate the Next.js build by running the project build and testing runtime compatibility after the upgrade. This Skill includes a final validation step to ensure updated dependencies and applied codemods function correctly together.