next-upgrade
Upgrade Next.js projects to newer versions
Developer Setup
Setup & Installation
npx skills add https://github.com/vercel-labs/next-skills --skill next-upgradenpx skills add https://github.com/vercel-labs/next-skills --skill next-upgradeOverview
What This Skill Does
Upgrades a Next.js project to a newer version by reading the current package.json, fetching the official migration guides, running the appropriate codemods, and updating dependencies. Handles incremental upgrades across major versions and flags any manual changes required by breaking API or config changes.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
Upgrade Next.js
Upgrade the current project to the latest Next.js version following official migration guides.
Instructions
Detect current version: Read
package.jsonto identify the current Next.js version and related dependencies (React, React DOM, etc.)Fetch the latest upgrade guide: Use WebFetch to get the official upgrade documentation:
- Codemods: https://nextjs.org/docs/app/guides/upgrading/codemods
- Version-specific guides (adjust version as needed):
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:
npx @next/codemod@latest <transform> <path>Common transforms:
next-async-request-api- Updates async Request APIs (v15)next-request-geo-ip- Migrates geo/ip properties (v15)next-dynamic-access-named-export- Transforms dynamic imports (v15)
Recommendations