Web frameworks on Cloudflare Workers
Sets up Astro, SvelteKit, React Router, TanStack Start, Nuxt, Hono and SPA apps on Cloudflare Workers, choosing C3, Wrangler or cf by the project's state. Use when creating, migrating or deploying a framework app on Workers.
frameworks-on-cloudflare- Author
- Cloudflare
- Source
- cloudflare/skills/skills/frameworks-on-cloudflare @ 5108325
- License
- Apache-2.0
About this skill
What it does
The skill routes a web-framework project to Cloudflare Workers. The framework stays the development interface and Workers is the deploy target; static sites and SPA output go to Workers Static Assets. Pages templates, commands and presets are ruled out for new apps, and existing Pages deployments are left alone during unrelated work.
The agent first inspects the framework, version, package manager, rendering mode, adapter and Cloudflare config, then takes one of three paths. A new project follows the framework's Workers guide, which currently creates it with C3 and Wrangler, an exception to the cf-first default because the cf docs do not cover framework projects yet. An existing Wrangler project keeps Wrangler, with no cf dev, cf build or cf deploy. A project with no Cloudflare config goes through cf, which detects supported frameworks; when the build still fails, the guide's manual setup applies. Either way the agent changes only adapter, runtime, build and deploy config, runs the framework's checks and build, and tests the Worker locally before deploying.
A table pairs each framework with its Workers guide and the framework's own agent guidance: TanStack Start with TanStack Intent, React Router (SPA mode does not work with the Cloudflare Vite plugin), SvelteKit with @sveltejs/adapter-cloudflare, Hono, Astro (prerendered as static assets, on-demand through @astrojs/cloudflare), Nuxt, and React or Vue SPAs. The folder adds only references/skill-feedback.md for fault reports to Cloudflare.
When to use it, and when not
Use it to create, migrate or deploy a framework app on Workers.
Next.js is handed to a nextjs-on-cloudflare skill, and a general cloudflare skill is mentioned too; neither is in this pack in our catalog.
How to run it
The install command below puts SKILL.md, the feedback file and the licence in place. Install Wrangler CLI and Cloudflare cf CLI as well, since the skill hands over to them. To call it yourself:
- Claude Code:
/frameworks-on-cloudflare, or ask for the skill by name. - Codex:
$frameworks-on-cloudflare. - Cursor: type
/in the Agent chat and pickframeworks-on-cloudflare.
Example: /frameworks-on-cloudflare Move this SvelteKit app from Pages to Workers and check it locally before deploying.
How it differs from similar skills
Deploy to Vercel and Deploy to Netlify put a project online from the chat. Deploy to Vercel, Vercel Labs checks the Git remote and link state first and steers towards Git-push deploys. Deploy to Render deploys from Git and describes databases and background services in a render.yaml Blueprint. This skill has no deploy command of its own: it settles the adapter and configuration for each framework and leaves the commands to the Wrangler and cf skills.
Install
Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.
curl -fsSL --create-dirs -o ~/.claude/skills/frameworks-on-cloudflare/SKILL.md https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/SKILL.md -o ~/.claude/skills/frameworks-on-cloudflare/LICENSE https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/LICENSE -o ~/.claude/skills/frameworks-on-cloudflare/references/skill-feedback.md https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/references/skill-feedback.md
curl -fsSL --create-dirs -o ~/.agents/skills/frameworks-on-cloudflare/SKILL.md https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/SKILL.md -o ~/.agents/skills/frameworks-on-cloudflare/LICENSE https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/LICENSE -o ~/.agents/skills/frameworks-on-cloudflare/references/skill-feedback.md https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/references/skill-feedback.md
foreach ($f in 'SKILL.md','LICENSE','references/skill-feedback.md') { $p = Join-Path "$HOME\.claude\skills\frameworks-on-cloudflare" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','LICENSE','references/skill-feedback.md') { $p = Join-Path "$HOME\.agents\skills\frameworks-on-cloudflare" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/$f" -UseBasicParsing -OutFile $p }Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/cloudflare/frameworks-on-cloudflare/SKILL.md
SKILL.md
Build with frameworks on Cloudflare
Use the framework as the primary development interface and Cloudflare Workers as the deployment target. Serve static sites and SPA output with Workers Static Assets. Do not select Pages templates, Pages deployment commands, or Pages-specific presets for new applications. Preserve existing Pages deployments during unrelated maintenance.
Route the project
- Inspect the repository before changing it. Identify the framework, installed version, package manager, rendering mode, existing adapter, and Cloudflare configuration:
cloudflare.config.ts, orwrangler.jsonc,wrangler.json, orwrangler.toml. - Preserve the user's framework choice. Determine whether the task starts a new project, adapts an existing project, or changes only application code.
- Read only the matching row below, its Workers framework guide, and the framework's own agent guidance.
- Set up the project for its state:
- New project: follow the framework's Workers guide for project creation. The guides currently create the project with C3 and configure it for Wrangler; this is an exception to the
cloudflareskill's default ofcffor new projects, because thecfdocs do not yet cover creating framework projects. After creation, the project has Wrangler configuration, so the next bullet applies. - Existing project with Wrangler configuration: keep Wrangler and load the
wranglerskill. Follow the framework guide for adapter and configuration changes. Do not runcf init .,cf dev,cf build, orcf deployin it. - Existing project with no Cloudflare configuration: use
cf, which detects supported frameworks and configures them; see Start from an existing project and thecf-cliskill. Detection does not mean the project builds. If the build fails or the framework is not supported, follow the framework guide's manual setup.
- New project: follow the framework's Workers guide for project creation. The guides currently create the project with C3 and configure it for Wrangler; this is an exception to the
- Change only the adapter, runtime, build, and deployment configuration the integration requires. Inspect generated package scripts, run the framework's checks and build, then verify the Worker locally before deployment.
| Framework | Workers setup | Official upstream agent guidance |
|---|---|---|
| Next.js | Load the nextjs-on-cloudflare skill. |
Listed in that skill. |
| TanStack Start | Follow the Workers guide, which uses the Cloudflare Vite plugin. Distinguish Start from standalone TanStack Router. | Use TanStack Intent to discover and load installed package skills, including Start's deployment guidance. |
| React Router | Identify Framework, Data, or Declarative mode. Follow the Workers guide for full-stack setup. SPA mode is not supported with the Cloudflare Vite plugin, and prerendering has version requirements; check the guide before choosing either. | Load the official React Router skill, its matching mode reference, and installed package docs when available. |
| SvelteKit | Follow the Workers guide, which uses @sveltejs/adapter-cloudflare. |
Use Svelte's official skills and AI setup guidance. |
| Hono | Choose an API-only Worker or a frontend plus API. The Cloudflare guide covers Hono with a React SPA; use Hono's Workers guide for an API-only app. | Load the application skill from honojs/skills. |
| Astro | Distinguish fully prerendered output from on-demand rendering: a static site deploys as static assets, and on-demand rendering uses @astrojs/cloudflare. Follow the Workers guide. |
Use Astro's official AI guidance and docs MCP. |
| Nuxt | Follow the Workers guide for the current Nitro integration and bindings. | Use the Nuxt docs MCP; load the Nuxt UI skill only when using Nuxt UI. |
| React or Vue SPA | Follow the React + Vite or Vue Workers guide. Distinguish a client-only SPA from a full-stack framework. | Use the chosen framework's official guidance for application development. |
For other frameworks, start from the framework guides index.
Skill feedback
If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md.
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel