agentleFS
robotostudiorobotostudio/turbo-start-sanity/.agents/skills/next-upgrade/SKILL.md

next-upgrade

Skill185 starsChanged 2 months agoMITView on GitHub

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

  • Installs packages

We split this skill into the rules it gives an agent

4 rules. 1 is common, 0 are distinctive, and 3 are very specific to this project.

  • 1

    Common

    Most of the 13 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:

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

    line 41
  3. Very specific:

    Run npm run build to check for build errors

    line 53
  4. Very specific:

    Run npm run dev and test key functionality

    line 54

“Common” is measured: kept by at least 6 in 10 of the 13 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 requested 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: Fetch the official upgrade documentation from these URLs:
  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)
  5. Update dependencies: Upgrade Next.js and peer dependencies together, using the exact [target-version] passed by the user for the current step. If no target version was provided, use the next incremental version identified in Step 3 instead of jumping straight to latest. Determine <supported-react-version> from the official upgrade guide for that target Next.js version, since React and React DOM peer requirements can change between releases:

    npm install next@<target-version> react@<supported-react-version> react-dom@<supported-react-version>
  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:
    • Run npm run build to check for build errors
    • 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.

Reviews can't be read right now.

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.