Upgrade Next.js versions: check breaking changes, migrate from Pages to App Router, update dependencies, run codemods, and verify the build.
When to use this skill
- Upgrading Next.js to a new version
- Migrating from Pages to App Router
- Running Next.js codemods
Core concepts
This skill provides guidance on next.js upgrade best practices, patterns, and common pitfalls. It is designed to be loaded on demand when a relevant task is detected.
Installation
curl -LO https://opencode-skills.example/downloads/framework/nextjs-upgrade.zip
unzip nextjs-upgrade.zip -d ~/.config/opencode/skills/
Restart OpenCode — the skill loads automatically.
When it triggers
- upgrading Next.js to a new version
- migrating from Pages to App Router
- running Next.js codemods