next-upgrade

Upgrade Next.js projects to the latest version using official migration guides and codemods.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Loosand/next-forge --skill next-upgrade-loosand
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/Loosand/next-forge/tree/main/.agents/skills/next-upgrade
Command: npx skills add https://github.com/Loosand/next-forge --skill next-upgrade-loosand

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

将 Next.js 项目升级到最新版本时,依据官方迁移指南和 codemods 提供可重复、低风险的升级路径,避免手动升级中的常见错误。

Core Features & Use Cases

  • 自动检测当前项目中的 Next.js、React 等相关依赖的版本。
  • 按官方指南逐步应用 codemods,处理跨重大版本的迁移。
  • 统一更新依赖、TypeScript 类型,以及验证构建和运行应用的完整工作流。

Quick Start

运行升级向导,让系统读取当前版本并应用 Next.js 官方 codemods 与 兼容性调整。

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?

To upgrade Next.js safely, the Skill reads your current project dependencies, applies official codemods step by step across major versions, and updates TypeScript types to enforce safe changes throughout the migration.

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

Codemods automate code transformations during a Next.js migration. The Skill applies these official codemods sequentially across major version jumps to handle breaking changes and ensure a repeatable, low-risk upgrade path.

Can I use this to migrate a Next.js project across multiple major versions?

Yes, the Skill supports migrating Next.js projects across multiple major version jumps by determining the applicable upgrade path from your detected dependencies and applying codemods step by step for each version.

Do I need to update TypeScript types manually when upgrading Next.js?

No, the Skill suggests updating TypeScript types and related dependencies automatically as part of the migration workflow, ensuring type compatibility while it applies codemods to handle breaking changes.

How do I validate my Next.js app after applying breaking changes from an upgrade?

To validate your Next.js app after an upgrade, the Skill recommends building and running the application to ensure all breaking changes applied via codemods and dependency updates function correctly.