Nextjs upgrade

From HoangNguyen0403/agent-skills-standard · View interactive version

Nextjs upgrade is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Next.js version migrations using official guides and codemods. Use when migrating a Next.js project to a new major version using codemods.

How to use this skill

Skill file

Next.js Upgrade Protocol

Automated and manual migration steps for Next.js version upgrades (e.g., v14 to v15).

**Priority: P1 (HIGH)**

Workflow: Upgrade Next.js to New Major Version

  1. Check current versions of next, react, react-dom in package.json
  2. Plan incremental path (e.g., v13 -> v14 -> v15; never skip majors)
  3. Run codemods: npx @next/codemod@15.0.8 <transform> <path>
  4. Update dependencies:

See implementation examples

  1. Verify async APIs: ensure cookies(), headers(), params awaited (v15+)
  2. Audit fetch caching: v15 defaults to no-store; add force-cache where needed
  3. Run next build and fix hydration or Turbopack errors
  4. Report codemod failures or manual fixes to team

Implementation Guidelines

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.