next-upgrade

Upgrade Next.js projects to newer versions using official migration guides and codemods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading Next.js across major versions involves breaking API changes, deprecated features, and peer dependency updates that are easy to miss when done manually, leading to build failures and runtime bugs. ## Core Features & Use Cases - Version Detection: Reads package.json to identify the current Next.js, React, and React DOM versions before planning the upgrade. - Official Migration Guides: Fetches the Next.js upgrading documentation and version-specific guides (v14, v15, v16) to determine the correct incremental upgrade path. - Automated Codemods: Runs @next/codemod transforms such as next-async-request-api and next-request-geo-ip to automate breaking change migrations. - Use Case: A project on Next.js 13 needs to reach Next.js 15. The skill plans the incremental path 13 to 14 to 15, applies the relevant codemods, updates dependencies and TypeScript types, then verifies the result with a build. ## Quick Start Upgrade this project to the latest Next.js version and apply all required 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?

Upgrade Next.js by first checking your current version in package.json, then following the official upgrade guides at nextjs.org. Run the provided codemods with npx @next/codemod@latest, update next, react, and react-dom together, and verify with a production build.

How to migrate to Next.js 15 async request APIs?

Next.js 15 made request APIs like params, searchParams, and cookies asynchronous. Run the next-async-request-api codemod via npx @next/codemod@latest to automatically update affected code, then review remaining manual changes in the version-15 upgrade guide.

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

For major version jumps, upgrade incrementally, for example from 13 to 14 to 15, rather than skipping versions. Each major version has its own migration guide and codemods, and incremental upgrades reduce the risk of compounding breaking changes.

What codemods does Next.js provide for upgrades?

Next.js provides codemods through the @next/codemod package, including next-async-request-api for async Request APIs in v15, next-request-geo-ip for geo and ip property migration, and next-dynamic-access-named-export for dynamic import transforms.

Why does my Next.js build fail after upgrading?

Build failures after upgrading usually come from unaddressed breaking changes such as async params in v15, outdated next.config.js options, or mismatched React and TypeScript type versions. Check the version-specific upgrade guide and update @types/react and @types/react-dom alongside the framework.