next-upgrade

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

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

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 detecting the current version, applying official codemods, and following version-specific migration guides. ## Core Features & Use Cases - Version Detection & Upgrade Path Planning: Reads package.json to identify the current Next.js version and plans incremental upgrades 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 handle breaking changes automatically. - Dependency & Type Updates: Upgrades next, react, react-dom, and TypeScript type packages together to keep peer dependencies consistent. - Use Case: A team on Next.js 14 wants to adopt Next.js 16. The Skill detects the current version, fetches the v15 and v16 migration guides, runs the relevant codemods, updates dependencies, and verifies the build. ## Quick Start Upgrade my Next.js project to the latest 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?

Detect your current version in package.json, run official codemods with npx @next/codemod@latest, then update dependencies with npm install next@latest react@latest react-dom@latest. Finally, review breaking changes in the migration guide and verify with npm run build.

What codemods are available for Next.js migration?

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.

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

For major version jumps, upgrade incrementally rather than skipping versions, such as going from 13 to 14 to 15. Each version has its own migration guide and codemods that must be applied in sequence to avoid missing breaking changes.

Does the Next.js upgrade work with pnpm, yarn, or bun?

Yes, the dependency update step supports npm, pnpm, yarn, and bun install commands. The codemod execution via npx @next/codemod works independently of which package manager your project uses.

Why does my build fail after upgrading Next.js?

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 migration guide and run the matching codemods before rebuilding.