Next.js Agent Skills Migration Guide

repository·main·Indexed 21 days ago

https://github.com/vercel-labs/next-skills

Documentation for migrating Next.js agent skills from the vercel-labs/next-skills repository to the main Next.js repository. Includes installation commands using npx skills add vercel/next.js, skill mapping for cache components, and instructions for setting up AI agent documentation for Next.js versions 16.1 and earlier.

Tokens
415
Snippets
2
Records
3
Agent score
26%

What's inside next-skills

  1. Install Next.js workflow skills from the new location

    main

    Next.js agent skills have moved to the main Next.js repository to ensure they stay version-matched with the framework. You can now install them using npx skills add pointing to the vercel/next.js package.

    To install all current Next.js workflow skills:

    npx skills add vercel/next.js

    To install a specific skill (e.g., the cache components optimizer):

    npx skills add vercel/next.js --skill next-cache-components-optimizer
  2. Set up Next.js documentation for AI agents on Next.js 16.1 or earlier

    main

    The auto-generated AGENTS.md and CLAUDE.md files require Next.js 16.3+. If you are using an older version, you can manually pull the version-matched bundled docs into your project using the @next/codemod canary command. This downloads the docs to a .next-docs/ directory and configures your AGENTS.md to point to them.

    npx @next/codemod@canary agents-md
  3. Migrate from old Next.js skills to the new location

    main

    If you have previously installed the old skills from this repository, they will still work locally but will not receive updates. It is recommended to re-install them from the new location to stay current with the framework version.

    Mapping of old skills to new locations/methods:

    Old SkillNew Method / Location
    next-cache-componentsInstall next-cache-components-optimizer or next-cache-components-adoption via npx skills add vercel/next.js
    next-best-practicesNo longer a skill. Knowledge is now provided via bundled docs and auto-generated AGENTS.md / CLAUDE.md files (Next.js 16.3+)
    next-upgradeNo longer a skill. Use npx @next/codemod@latest upgrade to perform upgrades.