agentleFS
georgekhananaevgeorgekhananaev/claude-skills-vault/.claude/skills/next-upgrade/SKILL.md

next-upgrade

Skill28 starsChanged 6 months agoMITView on GitHub

Upgrade Next.js to the latest version following official migration guides and codemods

  • Installs packages

7 other projects use a version of this, 6 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 2 are common, 0 are distinctive, and 3 are very specific to this project.

  • 2

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Detect current version: Read package.json to identify the current Next.js version and related dependencies (React, React DOM, etc.)

    line 13
  2. Common:

    Fetch the latest upgrade guide: Use WebFetch to get the official upgrade documentation:

    line 15
  3. Common:

    Review breaking changes: Check the upgrade guide for manual changes needed:

    line 45
  4. Very specific:

    ASK the user before running npm run build (builds are slow.

    line 56
  5. Very specific:

    Run npm run dev and test key functionality

    line 57

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 → 16).
  4. Prefer the automated path first: the official upgrade codemod bumps deps AND runs the right transforms interactively:
    npx @next/codemod@latest upgrade latest   # or: upgrade patch|minor|major|<version>
    next upgrade                              # built-in self-upgrade command (Next 16.1+)
    Fall back to individual codemods when the automated path can't run:
    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)
    • remove-experimental-ppr / remove-unstable-prefix - PPR & unstable_* cleanup (v16)
    • middleware-to-proxy - middleware.ts → proxy.ts (v16)
    • next-lint-to-eslint-cli - migrate off next lint (v16)
  5. Update dependencies: Upgrade Next.js and peer dependencies together:
    npm install next@latest react@latest react-dom@latest
  6. Review breaking changes: Check the upgrade guide for manual changes needed:
    • API changes (e.g., async params in v15)
    • Configuration changes in next.config.js
    • Deprecated features being removed
  7. Update TypeScript types (if applicable):
    npm install @types/react@latest @types/react-dom@latest
  8. Test the upgrade:
    • ASK the user before running npm run build (builds are slow; some users forbid unprompted builds)
    • Run npm run dev and test key functionality

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.