Automated migration from Next.js to vinext, a Vite-based Next.js reimplementation.
Works with
Handles compatibility scanning, package replacement, Vite config generation, and ESM conversion with a single vinext init command or manual fallback steps
Supports both App Router and Pages Router; existing app/ , pages/ , and next.config.js work unchanged — no application code modifications required
Includes native Cloudflare Workers deployment via vinext deploy with direct access to bindings (D1, R2,
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionmigrate-to-vinextExecute the skills CLI command in your project's root directory to begin installation:
Fetches migrate-to-vinext from cloudflare/vinext and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate migrate-to-vinext. Access via /migrate-to-vinext in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
1
total installs
1
this week
7.7K
GitHub stars
0
upvotes
Run in your terminal
1
installs
1
this week
7.7K
stars
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.
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.
| Command | Purpose |
|---|---|
vinext check |
Scan project for compatibility issues, produce scored report |
vinext init |
Automated migration — installs deps, generates config, converts to ESM |
vinext dev |
Development server with HMR |
vinext build |
Production build (multi-environment for App Router) |
vinext start |
Local production server |
vinext deploy |
Build and deploy to Cloudflare Workers |
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.
Run vinext init. This command:
vinext check for a compatibility reportvite as a devDependency (and @vitejs/plugin-rsc for App Router)"type": "module" to package.jsonpostcss.config.js → .cjs) to avoid ESM conflictsdev:vinext and build:vinext scripts to package.jsonvite.config.tsThis is non-destructive — the existing Next.js setup continues to work alongside vinext. Use the dev:vinext script to test before fully switching over.
If vinext init succeeds, skip to Phase 4 (Verify). If it fails or the user prefers manual control, continue to Phase 3.
Use this as a fallback when vinext init doesn't work or the user wants full control.
# Example with npm:
npm uninstall next
npm install vinext
npm install -D vite
# App Router only:
npm install -D @vitejs/plugin-rsc
Replace all next commands in package.json scripts:
| Before | After | Notes |
|---|---|---|
next dev |
vinext dev |
Dev server with HMR |
next build |
vinext build |
Production build |
next start |
vinext start |
Local production server |
next lint |
vinext lint |
Delegates to eslint/oxlint |
Preserve flags: next dev --port 3001 → vinext dev --port 3001.
Add "type": "module" to package.json. Rename any CJS config files:
postcss.config.js → postcss.config.cjstailwind.config.js → tailwind.config.cjs.js config that uses module.exportsSee references/config-examples.md for config variants per router and deployment target.
If the project already has custom Vite config, prefer Vite 8-native keys when editing it: oxc, optimizeDeps.rolldownOptions, and build.rolldownOptions. Older esbuild and build.rollupOptions settings still work for now but are migration targets.
Pages Router (minimal):
import vinext from "vinext";
import { defineConfig } from "vite";
export default defineConfig({ plugins: [vinext()] });
App Router (minimal):
import vinext from "vinext";
import { defineConfig } from "vite";
export default defineConfig({ plugins: [vinext()] });
vinext auto-registers @vitejs/plugin-rsc for App Router when the rsc option is not explicitly false. No manual RSC plugin config needed for local development.
If the user wants to deploy to Cloudflare Workers, use vinext deploy. It auto-generates wrangler.jsonc, worker entry, and Vite config if missing, installs @cloudflare/vite-plugin and wrangler, then builds and deploys.
For manual setup or custom worker entries, see references/config-examples.md.
To access Cloudflare bindings (D1, R2, KV, AI, Queues, Durable Objects, etc.), use import { env } from "cloudflare:workers" in any server component, route handler, or server action:
import { env } from "cloudflare:workers";
export default async function Page() {
const result = await env.DB.prepare("SELECT * FROM posts").all();
return <div>{JSON.stringify(result)}</div>;
}
This works because @cloudflare/vite-plugin runs server environments in workerd, where cloudflare:workers is a native module. No custom worker entry, no getPlatformProxy(), no special configuration needed. Just import and use.
Bindings must be defined in wrangler.jsonc. For TypeScript types, run wrangler types.
IMPORTANT: Do not use getPlatformProxy(), getRequestContext(), or custom worker entries with fetch(request, env) to access bindings. These are older patterns. cloudflare:workers is the recommended approach and works out of the box with vinext.
For deploying to Vercel, Netlify, AWS, Deno Deploy, or any other Nitro-supported platform, add the Nitro Vite plugin:
npm install nitro
// vite.config.ts
import { defineConfig } from "vite";
import vinext from "vinext";
import { nitro } from "nitro/vite";
export default defineConfig({
plugins: [vinext(), nitro()],
});
Build and deploy:
NITRO_PRESET=vercel npx vite build # Vercel
NITRO_PRESET=netlify npx vite build # Netlify
NITRO_PRESET=deno_deploy npx vite build # Deno Deploy
NITRO_PRESET=node npx vite build # Node.js server
Nitro auto-detects the platform in most CI/CD environments, so the preset is often unnecessary.
Note: For Cloudflare Workers, Nitro works but the native integration (vinext deploy / @cloudflare/vite-plugin) is recommended for the best developer experience with cloudflare:workers bindings, KV caching, and one-command deploys.
vinext dev to start the development serverSee references/troubleshooting.md for common migration errors.
| Feature | Status |
|---|---|
next/image optimization |
Remote images via @unpic; no build-time optimization |
next/font/google |
CDN-loaded, not self-hosted |
| Domain-based i18n | Not supported; path-prefix i18n works |
next/jest |
Not supported; use Vitest |
| Turbopack/webpack config | Ignored; use Vite plugins instead |
runtime / preferredRegion |
Route segment configs ignored |
| PPR (Partial Prerendering) | Use "use cache" directive instead (Next.js 16 approach) |
app/, pages/, or application code. vinext shims all next/* imports — no import rewrites needed.next/* imports to vinext/* in application code. Imports like next/image, next/link, next/server resolve automatically.vinext check before migration to surface issues early.next.config.js unless replacing it with next.config.ts or .mjs. vinext reads it for redirects, rewrites, headers, basePath, i18n, images, and env config.getPlatformProxy() or custom worker entries for bindings. Use import { env } from "cloudflare:workers" instead. This is the modern pattern and works out of the box with vinext and @cloudflare/vite-plugin.vinext deploy / @cloudflare/vite-plugin provides the best experience with cloudflare:workers bindings, KV caching, and image optimization. Nitro works for Cloudflare but the native setup is recommended.Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
leonxlnx/taste-skill
sickn33/antigravity-awesome-skills
erichowens/some_claude_skills
Keeps context tight: migrate-to-vinext is the kind of skill you can hand to a new teammate without a long onboarding doc.
I recommend migrate-to-vinext for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Registry listing for migrate-to-vinext matched our evaluation — installs cleanly and behaves as described in the markdown.
migrate-to-vinext reduced setup friction for our internal harness; good balance of opinion and flexibility.
migrate-to-vinext fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
migrate-to-vinext is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: migrate-to-vinext is focused, and the summary matches what you get after install.
migrate-to-vinext is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added migrate-to-vinext from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
migrate-to-vinext has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 57