---
name: frameworks-on-cloudflare
description: Build, migrate, and deploy web-framework applications on Cloudflare Workers. Use when a framework project such as Astro, SvelteKit, React Router, TanStack Start, Nuxt, Hono, or a React or Vue SPA targets Cloudflare, or when a framework repository contains Workers deployment configuration.
title: frameworks-on-cloudflare
canonical_url: https://skilld.dev/gh/cloudflare/skills/frameworks-on-cloudflare
last_updated: 2026-11-12T02:09:39.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/skill-feedback.md](https://skilld.dev/api/skills-raw/cloudflare/skills/frameworks-on-cloudflare/references/skill-feedback.md).
>
> If the user asked to install this Skill, run `npx skilld install cloudflare/skills/frameworks-on-cloudflare`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/frameworks-on-cloudflare`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/cloudflare/skills/frameworks-on-cloudflare) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/frameworks-on-cloudflare`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/frameworks-on-cloudflare --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/frameworks-on-cloudflare --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# 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](https://developers.cloudflare.com/workers/static-assets/index.md). 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](https://developers.cloudflare.com/cf/get-started/first-worker/index.md#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](https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack-start/index.md), which uses the Cloudflare Vite plugin. Distinguish Start from standalone TanStack Router. | Use [TanStack Intent](https://tanstack.com/intent/latest/docs/getting-started/quick-start-consumers) to discover and load installed package skills, including [Start's deployment guidance](https://github.com/TanStack/router/blob/main/packages/start-client-core/skills/start-core/deployment/SKILL.md). |
| React Router | Identify Framework, Data, or Declarative mode. Follow the [Workers guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/react-router/index.md) 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](https://github.com/remix-run/react-router/blob/main/.agents/skills/react-router/SKILL.md), its matching mode reference, and installed package docs when available. |
| SvelteKit | Follow the [Workers guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/sveltekit/index.md), which uses `@sveltejs/adapter-cloudflare`. | Use [Svelte's official skills](https://svelte.dev/docs/ai/skills) and [AI setup guidance](https://svelte.dev/docs/ai/instructions). |
| Hono | Choose an API-only Worker or a frontend plus API. The [Cloudflare guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/more-web-frameworks/hono/index.md) covers Hono with a React SPA; use [Hono's Workers guide](https://hono.dev/docs/getting-started/cloudflare-workers) for an API-only app. | Load the application skill from [honojs/skills](https://github.com/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](https://developers.cloudflare.com/workers/framework-guides/web-apps/astro/index.md). | Use Astro's [official AI guidance and docs MCP](https://docs.astro.build/en/guides/build-with-ai/). |
| Nuxt | Follow the [Workers guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/more-web-frameworks/nuxt/index.md) for the current Nitro integration and bindings. | Use the [Nuxt docs MCP](https://nuxt.com/docs/4.x/guide/ai/mcp); load the [Nuxt UI skill](https://ui.nuxt.com/getting-started/ai/mcp) only when using Nuxt UI. |
| React or Vue SPA | Follow the [React + Vite](https://developers.cloudflare.com/workers/framework-guides/web-apps/react/index.md) or [Vue](https://developers.cloudflare.com/workers/framework-guides/web-apps/vue/index.md) 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](https://developers.cloudflare.com/workers/framework-guides/index.md).

## Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read [references/skill-feedback.md](https://skilld.dev/api/skills-raw/cloudflare/skills/frameworks-on-cloudflare/references/skill-feedback.md).
