/web-dev:nextjs-upgradefrom web-dev
Assesses and upgrades a Next.js project to a target release, with tested automation for the Next.js 15 to 16 migration. Runs detection, upgrade path checking, and codemod execution.
Ships in web-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Resolve the requested target from the current Next.js release and upgrade guides, then compare it with the installed project. The bundled upgrade-path script is specifically tested for Next.js 15 to 16. Use its detection and measurement scripts for other targets, but derive migration steps from the matching official guide instead of presenting the v16 plan as current.
Scanning package.json, checking lock files, parsing build output — that's pure mechanics, not reasoning. These scripts handle it so you don't have to reconstruct the project state from scratch every time.
For a Next.js 15 to 16 migration, run the bundled scripts in this order. For any other target, run detection and measurement, then use the matching live upgrade guide and codemod documentation.
bash <skill-path>/scripts/detect-nextjs.sh /path/to/project
Returns JSON:
{
"nextjs_version": "15.1.0",
"react_version": "18.3.1",
"typescript_version": "5.7.2",
"has_typescript": true,
"package_manager": "bun",
"node_required": "",
"node_current": "20.11.0",
"router": {
"app_router": true,
"pages_router": false,
"app_dir": "app",
"pages_dir": ""
},
"linter": "eslint",
"formatter": "prettier",
"css_framework": "tailwind",
"tailwind_version": "3.4.0",
"next_config_file": "next.config.ts",
"uses_src_dir": false,
"turbopack": { "flag_in_scripts": true },
"react_compiler": { "installed": false, "version": "" },
"middleware": {
"has_middleware_file": true,
"middleware_path": "middleware.ts",
"has_proxy_file": false,
"proxy_path": ""
},
"scripts": {
"build": "next build",
"dev": "next dev --turbopack",
"lint": "next lint"
}
}
Pipe detect output or run standalone:
bash <skill-path>/scripts/detect-nextjs.sh /path/to/project \
| bash <skill-path>/scripts/check-upgrade-path.sh
Returns an ordered upgrade plan:
{
"from_version": "15.1.0",
"target_version": "16",
"package_manager": "bun",
"complexity": "medium",
"steps": [
{
"priority": 2,
"action": "bun add next@latest react@latest react-dom@latest && bun add -D @types/react@latest @types/react-dom@latest",
"reason": "Upgrade Next.js to v16, React to 19.2, and matching type definitions"
},
{
"priority": 3,
"action": "bunx @next/codemod@canary upgrade latest",
"reason": "Primary upgrade codemod: updates turbopack config, migrates middleware→proxy, removes unstable_ prefixes"
}
],
"codemods": [...],
"breaking_changes": ["--turbopack flag no longer needed", "middleware.ts must be renamed to proxy.ts"],
"notes": ["React Compiler provides automatic memoization — recommended"]
}
Execute steps in priority order. Each step has the exact command or action to perform.
Run before and after upgrading to quantify improvement:
bash <skill-path>/scripts/measure-build.sh /path/to/project
Returns:
{
"success": true,
"duration_ms": 18432,
"package_manager": "bun",
"build_command": "bun run build",
"warnings": [],
"errors": [],
"typescript_errors": [],
"bundle_sizes": {
"next_dir_size": "24M",
"first_load_js_summary": "First Load JS shared by all: 102 kB",
"route_table": ["○ /", "○ /about", "ƒ /api/posts"]
}
}
Run this before making changes to capture a baseline, then run again after to report the improvement.
| Field | What to do |
|---|---|
linter: "eslint" | Plan Biome migration — next lint is removed in v16 |
turbopack.flag_in_scripts: true | Remove --turbopack from package.json scripts |
middleware.has_middleware_file: true | Rename to proxy.ts, update function export |
router.app_router: true | Async Dynamic API codemod applies |
node_current < 20.9 | Node.js upgrade required before anything else |
complexity | Meaning |
|---|---|
low | No breaking changes, minor version bump |
medium | 1-2 breaking changes, run primary codemod |
high | 3+ breaking changes or jumping multiple major versions |
Execute the steps array in order — priority 1 steps must complete before priority 2, etc.
| Field | Meaning |
|---|---|
success: false | Build failed — check errors and typescript_errors |
warnings | Non-fatal issues to address |
bundle_sizes.first_load_js_summary | Key metric for before/after comparison |
bundle_sizes.route_table | Per-route sizes for identifying large pages |
detect-nextjs.sh — understand current statemeasure-build.sh — capture baseline build time and bundle sizescheck-upgrade-path.sh — get the ordered step listmeasure-build.sh again — report the improvement to the userWhen asked to update a Next.js project, always run detect first. Never assume the router type, package manager, or linter — the project state determines the migration path.
# Before
bash <skill-path>/scripts/measure-build.sh . > /tmp/build-before.json
# ... make changes ...
# After
bash <skill-path>/scripts/measure-build.sh . > /tmp/build-after.json
# Report delta
node -e "
const before = require('/tmp/build-before.json');
const after = require('/tmp/build-after.json');
const pct = Math.round((1 - after.duration_ms / before.duration_ms) * 100);
console.log('Build time: ' + before.duration_ms + 'ms → ' + after.duration_ms + 'ms (' + pct + '% faster)');
"
{
"dev": "next dev --turbopack", → "next dev"
"build": "next build",
"lint": "next lint" → "biome check ."
}
experimental.turbopack → top-level turbopackreactCompiler: true (stable in v16)cacheComponents: true (replaces experimental.ppr)images.domains → images.remotePatterns// Before
const cookieStore = cookies()
const { slug } = params
// After
const cookieStore = await cookies()
const { slug } = await props.params
// middleware.ts → proxy.ts
export function proxy(request: Request) { // was: middleware
return NextResponse.next()
}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/chartingData visualization and charting. Use for "create a chart", "visualize this data", "build a dashboard", "plot this", "graph these metrics", "make a bar chart", "build a heatmap", or help choosing a chart type, picking a charting library by data scale, or building the pipeline from raw database state to rendered visualization./chrome-cdpThis skill should be used when the user asks to "inspect this page in Chrome", "debug what's happening in my browser", "read the browser console logs", "interact with the page open in Chrome", or "attach to my live Chrome session". Interacts with the user's local Chrome browser session via Chrome DevTools Protocol — no extension, no Puppeteer — but only after explicit user approval to inspect, debug, or interact with an open tab./create-next-projectThis skill should be used when the user asks to "create a new project", "scaffold a Next.js app", "initialize a new app", "start a new project", "set up a new Next.js project", or mentions "create-next-project". Provides a guided, opinionated full-stack Next.js project initialization with Biome, Tailwind v4, shadcn/ui, better-auth, and Vercel deployment. Uses agent teams for parallel execution./frontend-performanceThis skill should be used when the user asks to "optimize my Next.js app", "why is this page slow", "reduce my bundle size", "improve Core Web Vitals", or "run a Lighthouse audit". Diagnoses and fixes Next.js frontend performance issues using Lighthouse, bundle analysis, and animation best practices — covering LCP, TBT, and CLS./generative-uiDecide between static components and AI-generated interfaces, and build the latter. Use for "generative UI", "dynamic UI", "json-render", "render JSON as UI", "AI UI generation", "MCP App UI", "deliver UI in chat", or "interactive chat interface". Covers the json-render framework, renderer and catalog selection, and MCP Apps delivery through ui:// resources./github-starsThis skill should be used when adding GitHub star counts, star buttons, star widgets, or GitHub social proof to a website or app. Applies when the user says "add GitHub stars", "show star count", "add a star badge", "GitHub badge", "star widget", "GitHub social proof", "stargazer count", or wants to display how many stars a repo has on a marketing page, header, or landing page. Also applies when integrating the GitHub API for repository metadata display.web-dev@b-open-io is listed by b-open-io/claude-plugins — review the source before installing
npx claudepluginhub b-open-io/claude-plugins --plugin web-devOther plugins' skills for the same job