nextjs-upgrade-assistant

Guides Next.js version upgrades with codemods, breaking-change fixes, and staged migration checklists.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill nextjs-upgrade-assistant-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-upgrade-assistant
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/nextjs-upgrade-assistant
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill nextjs-upgrade-assistant-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Upgrading Next.js across major versions involves breaking changes, removed APIs, and configuration migrations that are easy to miss, leading to build failures, hydration errors, and caching regressions in production. ## Core Features & Use Cases - Guided Upgrade Workflow: Step-by-step phases covering dependency updates, next.config migration, code changes, testing, and deployment with rollback plans. - Breaking Change Remediation: Documents removed features (getStaticProps, getServerSideProps, pages/ directory), changed defaults, and API updates with concrete before/after code fixes. - Codemod Automation: Uses @next/codemod transformations and next-devtools-mcp queries to automate mechanical migrations. - Use Case: When moving a production app from Next.js 15 to 16, follow the pre-upgrade checklist, run codemods, fix hydration and Server Actions issues using the provided patterns, then validate against the success criteria before deploying. ## Quick Start Ask the agent to upgrade my Next.js project from version 15 to 16 and walk me through the breaking changes, codemods, and verification steps.

Frequently Asked Questions about nextjs-upgrade-assistant

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Next.js from version 15 to 16?

Update dependencies with npm install next@16 react@latest react-dom@latest, then run npx @next/codemod upgrade for automated transformations. Follow the phased process: update configuration, migrate code, test builds, and deploy to staging before production.

What breaking changes exist in Next.js 16?

Next.js 16 removes getStaticProps, getServerSideProps, and getInitialProps in favor of Server Components, and drops the pages/ directory for new apps. Server Components are now default, fetch caching defaults changed, and dynamic routes require explicit generateStaticParams.

Why do I get hydration errors after upgrading Next.js?

Hydration mismatches occur when server and client render different content, such as rendering new Date() directly. Fix this by moving dynamic values into a client component with useEffect and useState, and add suppressHydrationWarning where appropriate.

How do I fix Next.js build errors after an upgrade?

Clear the .next cache directory, delete node_modules and package-lock.json, reinstall dependencies, and rebuild. Most module-not-found and type errors after upgrades come from stale caches or mismatched dependency versions.

Why is my Next.js Server Action not working?

Server Actions require the 'use server' directive at the top of the file and must return only serializable data. Returning objects like Date instances fails; convert them to strings with toISOString() before returning.

How do I roll back a failed Next.js upgrade?

Revert using git reset --hard HEAD~1 or git checkout to the previous commit, then delete node_modules and package-lock.json and reinstall dependencies. Verify the rollback by running the dev server and test suite.