next-upgrade

Upgrade Next.js projects using official codemods and validate builds.

1|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Moisesjr20/gueclaw --skill next-upgrade-moisesjr20
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/Moisesjr20/gueclaw/tree/main/.agents/skills/next-upgrade
Command: npx skills add https://github.com/Moisesjr20/gueclaw --skill next-upgrade-moisesjr20

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many Next.js projects require manual, error-prone changes when moving across major versions; this Skill automates detection, codemod application, dependency updates, and verification to reduce regressions and migration effort.

Core Features & Use Cases

  • Version detection: Reads package.json and related files to determine current Next.js and peer dependency versions.
  • Codemod orchestration: Suggests and runs official @next codemods to automate breaking-change transformations.
  • Dependency and config updates: Recommends and applies updates to next, react, react-dom, TypeScript types, and next.config adjustments; verifies with build and dev runs.
  • Use Case: Migrate a monorepo or single app from Next.js 13 to 15 by applying incremental codemods, updating peer deps, addressing App Router changes, and validating the build.

Quick Start

Upgrade the project to the latest Next.js by detecting the current version, applying the official codemods, updating peer dependencies, and running a build to verify success.

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 major version without breaking my project?

To upgrade Next.js safely, you can automate the process by detecting your current version, applying official @next codemods for breaking changes, updating peer dependencies like react and react-dom, and validating the build.

What is the best way to migrate to the Next.js App Router?

Migrating to the App Router involves fetching official upgrade documentation, applying necessary codemods to transform your project structure, and updating your next.config file to ensure compatibility with the new router architecture.

How do @next codemods work when updating a Next.js project?

@next codemods work by automatically applying official breaking-change transformations to your codebase during a Next.js upgrade, handling version detection and code modifications to reduce manual migration effort and regressions.

Can I update peer dependencies like React and TypeScript types during a Next.js migration?

Yes, a proper Next.js migration recommends and applies updates to peer dependencies including react, react-dom, and TypeScript types, ensuring your entire configuration aligns with the newly targeted Next.js release.

Does this Next.js upgrade approach work for monorepo or single app repositories?

Yes, this upgrade approach works for both single apps and monorepos by reading package.json files to perform version detection, applying incremental codemods, and running build validations to verify migration success across the repository.

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

A Next.js build may fail after an upgrade due to unaddressed breaking changes or outdated peer dependencies; running official codemods and updating next.config settings resolves these regressions to validate the build successfully.