next-upgrade

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

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/alecanche04-cyber/examenprograma --skill next-upgrade-alecanche04-cyber
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/alecanche04-cyber/examenprograma/tree/main/EXAMEN_PROGRA_2-master/.agents/skills/next-upgrade
Command: npx skills add https://github.com/alecanche04-cyber/examenprograma --skill next-upgrade-alecanche04-cyber

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: Reads package.json to identify the current Next.js, React, and React DOM versions before planning the upgrade path. - Official Migration Guides: Fetches the latest Next.js upgrade documentation and codemod references to determine which breaking changes apply. - Automated Codemods: Runs @next/codemod transforms such as next-async-request-api to automatically rewrite code affected by breaking changes. - Use Case: A project stuck on Next.js 13 needs to reach the latest version. The Skill upgrades incrementally (13 to 14 to 15), applies codemods for async request APIs, updates dependencies and TypeScript types, then verifies the build. ## Quick Start Upgrade my Next.js project to the latest 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 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 with npm run build.

How to migrate Next.js across multiple major versions?

Migrate incrementally through each major version rather than jumping directly, for example 13 to 14 to 15. Apply the version-specific migration guide and codemods at each step to handle breaking changes safely.

What codemods does Next.js provide for breaking changes?

Next.js provides codemods via @next/codemod, 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.

Does upgrading Next.js require updating React and TypeScript types?

Yes, Next.js upgrades typically require updating peer dependencies together, including react and react-dom. For TypeScript projects, also update @types/react and @types/react-dom to their latest versions to avoid type mismatches.

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. Run the relevant codemods and review the version-specific upgrade guide for manual changes.