
Next Upgrade
Upgrade a Next.js app across major versions using official guides, dependency bumps, and @next/codemod without missing breaking changes.
Install
npx skills add https://github.com/vercel-labs/vercel-plugin --skill next-upgradeWhat is this skill?
- Follows official Next.js upgrading and codemod documentation paths
- Detects migrate intent from package.json, next.config, and npx @next/codemod usage
- Covers npm, pnpm, bun, and yarn install lines for next@ version pins
- Chains to nextjs skill when Pages Router APIs like getServerSideProps appear
- Surfaces breaking-change and migration-guide retrieval aliases for agents
Adoption & trust: 232 installs on skills.sh; 187 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Frontend Designanthropics/skills
Vercel React Best Practicesvercel-labs/agent-skills
Remotion Best Practicesremotion-dev/skills
Vercel Composition Patternsvercel-labs/agent-skills
Develop Userscriptsxixu-me/skills
Next Best Practicesvercel-labs/next-skills
Journey fit
Common Questions / FAQ
Is Next Upgrade safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Next Upgrade
name: next-upgrade description: Upgrade Next.js to the latest version following official migration guides and codemods. Use when upgrading Next.js versions, running codemods, or migrating between major releases. metadata: priority: 6 docs: - "https://nextjs.org/docs/app/guides/upgrading" - "https://nextjs.org/docs/app/guides/upgrading/codemods" pathPatterns: - 'next.config.*' - 'package.json' bashPatterns: - '\bnpx\s+@next/codemod\b' - '\bnpm\s+(install|i|add)\s+[^\n]*\bnext@' - '\bpnpm\s+(install|i|add)\s+[^\n]*\bnext@' - '\bbun\s+(install|i|add)\s+[^\n]*\bnext@' - '\byarn\s+add\s+[^\n]*\bnext@' promptSignals: phrases: - "upgrade next" - "upgrade nextjs" - "migrate next" - "update next.js" - "next.js upgrade" - "nextjs migration" - "next codemod" allOf: - [upgrade, next] - [migrate, next] - [update, nextjs] anyOf: - "breaking changes" - "codemod" - "migration guide" - "version upgrade" noneOf: [] minScore: 6 retrieval: aliases: - next upgrade - nextjs migration - next codemod intents: - upgrade Next.js to latest version - run Next.js codemods - migrate between major Next.js versions entities: - codemod - migration - upgrade - breaking changes chainTo: - pattern: 'getServerSideProps|getStaticProps|next/router|next/head|next/document' targetSkill: nextjs message: 'Pages Router patterns detected during upgrade — loading Next.js best practices for App Router migration.' --- name: next-upgrade description: Upgrade Next.js to the latest version following official migration guides and codemods. Use when upgrading Next.js versions, running codemods, or migrating between major releases. metadata: priority: 6 docs: - "https://nextjs.org/docs/app/guides/upgrading" - "https://nextjs.org/docs/app/guides/upgrading/codemods" pathPatterns: - 'next.config.*' - 'package.json' bashPatterns: - '\bnpx\s+@next/codemod\b' - '\bnpm\s+(install|i|add)\s+[^\n]*\bnext@' - '\bpnpm\s+(install|i|add)\s+[^\n]*\bnext@' - '\bbun\s+(install|i|add)\s+[^\n]*\bnext@' - '\byarn\s+add\s+[^\n]*\bnext@' promptSignals: phrases: - "upgrade next" - "upgrade nextjs" - "migrate next" - "update next.js" - "next.js upgrade" - "nextjs migration" - "next codemod" allOf: - [upgrade, next] - [migrate, next] - [update, nextjs] anyOf: - "breaking changes" - "codemod" - "migration guide" - "version upgrade" noneOf: [] minScore: 6 retrieval: aliases: - next upgrade - nextjs migration - next codemod intents: - upgrade Next.js to latest version - run Next.js codemods - migrate between major Next.js versions entities: - codemod - migration - upgrade - breaking changes chainTo: - pattern: 'getServerSideProps|getStaticProps|next/router|next/head|next/document' targetSkill: nextjs message: 'Pages Router patterns detected during upgrade — loading Next.js best practices for App Router migration.' --- # Upgrade Next.js Upgrade the current project to the latest Next.js version following official migration guides. ## Instructions 1. **Detect current version**: Read `package.json` to identify the current Next.js version and related dependencies (React, React DOM, etc.) 2. **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): - https://nextjs.org/docs/app/guides/upgrading/version-16 - https://nextjs.org/docs/app/guides/upgrading/version-15 - https://nextjs.org/docs/app/guides/upgrading/version-14 3. **Determine upgrade path**: Based on current version, identify which migration steps apply. For ma