Upgrade Next.js to the latest version following official migration guides and codemods
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
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: