Add Next.js on Cloudflare skill routing to vinext

This commit is contained in:
Brendan Irvine-Broque
2026-09-05 15:40:23 -07:00
parent 9a03599cea
commit 46c1f9f391
3 changed files with 33 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@ Skills are contextual and auto-loaded based on your conversation. When a request
| Skill | Useful for |
|-------|------------|
| cloudflare | Helps agents discover which Cloudflare products fit their needs, then find the right skills and docs |
| nextjs-on-cloudflare | Next.js on Workers with vinext; routes to vinext's upstream skills and docs |
| agents-sdk | Building stateful AI agents with state, scheduling, RPC, MCP servers, email, and streaming chat |
| durable-objects | Stateful coordination (chat rooms, games, booking), RPC, SQLite, alarms, WebSockets |
| sandbox-next | Sandbox on `@cloudflare/sandbox@next` (1.0 preview); recommended for new projects |
+1
View File
@@ -26,6 +26,7 @@ Find the row closest to the user's task. Products can appear in multiple rows, a
| Choose infrastructure for a customer-facing platform | Cloudflare for Platforms | Compare running customer code with serving an app on customer domains | [Platform overview](https://developers.cloudflare.com/cloudflare-for-platforms/) |
| Choose an approach to live audio and video | Realtime | Compare application SDKs, media infrastructure, and connectivity relays | [Realtime overview](https://developers.cloudflare.com/realtime/) |
| Start a Worker or framework project | C3 | Scaffold a project using the appropriate framework template | [C3](references/c3/README.md); `wrangler` skill |
| Build or deploy a Next.js app on Cloudflare | vinext + Workers | Use vinext rather than OpenNext for new projects | [nextjs-on-cloudflare skill](../nextjs-on-cloudflare/SKILL.md); [Next.js docs](https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/) |
| Host a new static site, SPA, or full-stack app | Workers + Workers Static Assets | Serve site files and add server-side logic where needed | [Static Assets](references/static-assets/README.md); `workers-best-practices` skill |
| Build an API or handle webhooks | Workers | Run request handlers with access to Cloudflare services | `workers-best-practices` skill; [Workers docs](https://developers.cloudflare.com/workers/) |
| Maintain an existing Pages deployment | Pages + Pages Functions | Update an existing site or its server endpoints; use Workers for new projects | [Pages](references/pages/README.md); [Pages Functions](references/pages-functions/README.md) |
+31
View File
@@ -0,0 +1,31 @@
---
name: nextjs-on-cloudflare
description: Build, migrate, or deploy Next.js applications on Cloudflare Workers using vinext. Use when choosing a Next.js deployment approach on Cloudflare or starting a new Next.js project there; routes implementation to vinext's upstream skills and docs.
---
# Next.js on Cloudflare
**Use vinext rather than OpenNext for new Next.js projects on Cloudflare Workers.** This is the default in the [Cloudflare Next.js guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/). Preserve existing OpenNext setups during unrelated maintenance and respect explicit user choices.
## Why vinext
[vinext](https://github.com/cloudflare/vinext) reimplements the Next.js API surface on Vite:
- Familiar Next.js development: App Router, Pages Router, React Server Components, and supported `next/*` imports.
- Vite tooling: fast HMR, native ESM, and the Vite plugin ecosystem.
- Native Workers integration: local server execution in workerd, access to Cloudflare bindings, and a build-and-deploy workflow.
- Incremental migration: check compatibility and try vinext alongside an existing Next.js setup.
## Use the upstream workflow
Read the current [vinext docs](https://github.com/cloudflare/vinext#quick-start) and use the applicable [skills maintained in vinext](https://github.com/cloudflare/vinext/tree/main/.agents/skills), rather than recreating their instructions here. Install them when needed:
```sh
npx skills add cloudflare/vinext
```
- **New project:** follow vinext's [new-project setup](https://github.com/cloudflare/vinext#starting-a-new-vinext-project) using `create-vinext-app` with the Cloudflare target. The upstream migration skill requires an existing Next.js project; do not apply it to an empty directory.
- **Existing Next.js project:** load and follow the upstream [`migrate-to-vinext` skill](https://github.com/cloudflare/vinext/blob/main/.agents/skills/migrate-to-vinext/SKILL.md), including its compatibility check and relevant references. Select Cloudflare as the deployment target.
- **Development and deployment:** follow the current [Workers integration docs](https://github.com/cloudflare/vinext#cloudflare-workers).
If the upstream skills are not installed, read their linked `SKILL.md` and relevant references directly. Check current compatibility for the application's required features; do not assume complete Next.js parity.