next-upgrade

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading Next.js across major versions involves breaking API changes, deprecated features, and dependency conflicts that are tedious and error-prone to handle manually. This Skill automates the upgrade workflow by following official migration guides and running codemods. ## Core Features & Use Cases - Version Detection & Upgrade Path Planning: Reads package.json to identify the current Next.js version and determines incremental migration steps for major version jumps (e.g., 13 → 14 → 15). - Automated Codemods: Runs official @next/codemod transforms such as next-async-request-api and next-request-geo-ip to apply breaking changes automatically. - Dependency & Type Updates: Upgrades next, react, react-dom, and TypeScript type packages together, then validates the result with build and dev-server checks. - Use Case: A team on Next.js 14 needs to move to the latest release. The Skill detects the version, fetches the v15 and v16 upgrade guides, runs the relevant codemods, updates dependencies, and verifies the build passes. ## Quick Start Upgrade this project to the latest Next.js version and run the necessary 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?

Upgrade Next.js by first checking your current version in package.json, then running official codemods with npx @next/codemod@latest, and finally updating dependencies with npm install next@latest react@latest react-dom@latest. Verify the upgrade by running npm run build.

How to migrate Next.js across multiple major versions?

Migrate major versions incrementally rather than jumping directly, such as 13 to 14 to 15. Follow the version-specific upgrade guides at nextjs.org/docs/app/guides/upgrading and apply each version's codemods and manual breaking changes in sequence.

What codemods does Next.js provide for upgrades?

Next.js provides codemods via @next/codemod, including next-async-request-api for async Request APIs in v15, next-request-geo-ip for geo/ip property migration, and next-dynamic-access-named-export for dynamic import transforms. Run them with npx @next/codemod@latest <transform> <path>.

Does upgrading Next.js require updating React too?

Yes, Next.js upgrades typically require updating React and React DOM together as peer dependencies. Install them with npm install next@latest react@latest react-dom@latest, and update @types/react and @types/react-dom if using TypeScript.

Why does my Next.js build fail after upgrading?

Build failures after upgrading usually come from unapplied breaking changes such as async params in v15, outdated next.config.js options, or removed deprecated features. Check the version-specific upgrade guide for manual changes and run the relevant codemods.