skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

next-upgrade

Upgrade Next.js projects to newer versions

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/vercel-labs/next-skills --skill next-upgrade

Overview

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

Documentation

Show Skills.md file

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:

  3. Determine upgrade path: Based on current version, identify which migration steps apply. For major version jumps, upgrade incrementally (e.g., 13 → 14 → 15).

  4. 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)
Lines 1 - 25 of 44

Recommendations

Explore other random skills

All skillsMy patterns