Upgrade Next.js to the latest version following official migration guides and codemods
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Determine upgrade path: Based on current version, identify which migration steps apply. For major version jumps, upgrade incrementally (e.g., 13 → 14 → 15).
Run codemods first: Next.js provides codemods to automate breaking changes:
Update dependencies: Upgrade Next.js and peer dependencies together, using the exact [target-version] passed by the user for the current step. If no target version was provided, use the next incremental version identified in Step 3 instead of jumping straight to latest. Determine <supported-react-version> from the official upgrade guide for that target Next.js version, since React and React DOM peer requirements can change between releases: