Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

migrate-to-vinext

FreeNo executable scriptsNot checked

Migrates Next.js projects to vinext (Vite-based Next.js reimplementation). Load when asked to migrate, convert, or switch from Next.js to vinext. Handles…

cloudflareby cloudflare★ 9,445 GitHub stars

About this skill

Migrate Next.js to vinext

vinext reimplements the Next.js API surface on Vite. Existing app/, pages/, and next.config.js work as-is — migration is a package swap, config generation, and ESM conversion. No changes to application code required.

FIRST: Verify Next.js Project

Confirm next is in dependencies or devDependencies in package.json. If not found, STOP — this skill does not apply.

Detect the package manager from the lockfile:

Lockfile Manager Install Uninstall
pnpm-lock.yaml pnpm pnpm add pnpm remove
yarn.lock yarn yarn add yarn remove
bun.lockb / bun.lock bun bun add bun remove
package-lock.json or none npm npm install npm uninstall

Detect the router: if an app/ directory exists at root or under src/, it's App Router. If only pages/ exists, it's Pages Router. Both can coexist.

Quick Reference

Command Purpose
vinext check Scan project for compatibility issues, produce scored report
vinext init Automated migration — installs deps, generates config, converts to ESM
npx vite dev Development server with HMR
npx vite build Production build (multi-environment for App Router)
vinext start Local production server
npx @vinext/cloudflare deploy Build and deploy to Cloudflare Workers
vp exec vinext-cloudflare deploy Build and deploy to Cloudflare Workers with Vite+

Phase 1: Check Compatibility

Run vinext check (install vinext first if needed via npx vinext check). Review the scored report. If critical incompatibilities exist, inform the user before proceeding.

See references/compatibility.md for supported/unsupported features and ecosystem library status.

Phase 2: Automated Migration (Recommended)

Ask the user which deployment target they want (Cloudflare Workers or Node), then pass it with --platform. For Cloudflare, also ask for the cache and image choices below. vinext init prompts for them only in an interactive terminal: agents and CI must pass all three of --cdn-cache, --data-cache, and --image-optimization, and in an agent session init errors out without them. Do not pick a choice for the user.

npx vinext init --platform=node
npx vinext init --platform=cloudflare --cdn-cache=none --data-cache=none --image-optimization=none --no-prerender

Cloudflare init flags

Flag Values Meaning
--cdn-cache none, response-store, workers-cache, static-assets, data-cache Response cache. none: no shared cache. response-store: Workers Response Store, which also handles data. workers-cache: Workers Cache. static-assets: read-only build-time prerender. data-cache: responses and data both in KV
--response-store-mode service-binding (default), self-contained Only with --cdn-cache=response-store. service-binding runs the cache in a separate Worker deployed with deploy:response-store; self-contained adds its bindings to the app Worker
--data-cache kv, none Data cache for fetch, unstable_cache, and "use cache". Must be none with --cdn-cache=none or response-store, and kv with --cdn-cache=data-cache
--image-optimization cloudflare-images, none
Full SKILL.md on GitHub

Install migrate-to-vinext in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/compatibility.mdreferences/config-examples.mdreferences/troubleshooting.md

FAQ

What does the migrate-to-vinext skill do?

Migrates Next.js projects to vinext (Vite-based Next.js reimplementation). Load when asked to migrate, convert, or switch from Next.js to vinext. Handles compatibility scanning, package replacement, Vite config generation, ESM conversion, and deployment setup (Cloudflare Workers natively, other platforms via Nitro).

How do I install the migrate-to-vinext skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the migrate-to-vinext skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare migrate-to-vinext with