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.

DevOpsPack: Cloudflare skills36 linesframeworks-on-cloudflare
Author
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 pick frameworks-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.

Claude Code — macOS, Linux
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
Codex, Cursor — macOS, Linux
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
Claude Code — Windows PowerShell
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 }
Codex, Cursor — Windows PowerShell
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

Raw

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

  1. Inspect the repository before changing it. Identify the framework, installed version, package manager, rendering mode, existing adapter, and Cloudflare configuration: cloudflare.config.ts, or wrangler.jsonc, wrangler.json, or wrangler.toml.
  2. Preserve the user's framework choice. Determine whether the task starts a new project, adapts an existing project, or changes only application code.
  3. Read only the matching row below, its Workers framework guide, and the framework's own agent guidance.
  4. 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 cloudflare skill's default of cf for new projects, because the cf docs 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 wrangler skill. Follow the framework guide for adapter and configuration changes. Do not run cf init ., cf dev, cf build, or cf deploy in it.
    • Existing project with no Cloudflare configuration: use cf, which detects supported frameworks and configures them; see Start from an existing project and the cf-cli skill. Detection does not mean the project builds. If the build fails or the framework is not supported, follow the framework guide's manual setup.
  5. 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.

More from the pack Cloudflare skills

Cloudflare Workers best practices

Checks Cloudflare Workers code and config against production rules: current compatibility dates, logs and traces, streaming, waitUntil, bindings over REST calls, Web Crypto, generated Env types. Use when writing, reviewing or shipping a Worker.

Wrangler CLI

Guides Wrangler commands and config in projects with wrangler.jsonc or wrangler.toml, checking installed help and current docs and guarding secrets, environments and Previews. Use when deploying, configuring or debugging a Worker with Wrangler.

Cloudflare Durable Objects

Builds and reviews Cloudflare Durable Objects: one object per entity, SQLite storage and migrations, RPC methods, alarms, WebSockets and Vitest tests, with links to current docs. Use when a Workers app needs shared state or coordination.

Cloudflare Agents SDK

Builds and reviews apps on Cloudflare's Agents SDK: stateful agents on Durable Objects, callable RPC, scheduling, queues, Workflows, AIChatAgent chat, MCP and email. Use when building an AI agent or chat app on Workers.

Local Workers development

Runs and debugs Workers locally with cf dev, wrangler dev or the Vite plugin, using Local Explorer to read and seed binding data and query traces. Use when a local request fails or you need to see what a binding returned.

Cloudflare cf CLI

Finds and runs commands of Cloudflare's beta cf CLI through cf cli search, cf schema and dry runs, and picks cf or Wrangler per project. Use when managing DNS, zones, D1, KV or R2 from the terminal or starting a new Workers project.

Web performance audit

Audits a web page's loading performance through Chrome DevTools MCP: a trace, Core Web Vitals against thresholds, network, an accessibility snapshot and bundle config, with ranked fixes. Use when a page is slow or its Lighthouse score is low.