Веб-фреймворки на Cloudflare Workers
Настраивает приложения на Astro, SvelteKit, React Router, TanStack Start, Nuxt, Hono и SPA под Cloudflare Workers, выбирая C3, Wrangler или cf по состоянию проекта. Для случаев, когда приложение создают, переносят или деплоят на Workers.
frameworks-on-cloudflare- Автор
- Cloudflare
- Источник
- cloudflare/skills/skills/frameworks-on-cloudflare @ 5108325
- Лицензия
- Apache-2.0
Об этом скилле
Что делает
Скилл готовит проект на веб-фреймворке к работе в Cloudflare Workers. Фреймворк остаётся основным инструментом разработки, а Workers — местом деплоя; статические сайты и сборки SPA уходят в Workers Static Assets. Шаблоны, команды и пресеты Pages для новых приложений исключены, а существующие деплои на Pages при посторонних задачах не трогаются.
Сначала агент выясняет фреймворк и его версию, пакетный менеджер, режим рендеринга, адаптер и конфигурацию Cloudflare, а дальше выбирает один из трёх путей. Новый проект создаётся по гайду фреймворка для Workers — сейчас это C3 и Wrangler, исключение из правила «сначала cf», потому что документация cf пока не описывает проекты на фреймворках. Существующий проект на Wrangler остаётся на Wrangler, без cf dev, cf build и cf deploy. Проект без конфигурации Cloudflare настраивается через cf, который сам распознаёт поддерживаемые фреймворки; если сборка всё равно падает, агент идёт по ручной настройке из гайда. В любом случае он меняет только адаптер, рантайм, сборку и конфигурацию деплоя, прогоняет проверки и сборку фреймворка и запускает Worker локально перед деплоем.
Таблица связывает каждый фреймворк с его гайдом для Workers и собственными инструкциями фреймворка для агентов. В ней — TanStack Start с TanStack Intent, React Router (SPA-режим с плагином Cloudflare для Vite не работает), SvelteKit с @sveltejs/adapter-cloudflare и Hono. Дальше — Astro (предрендер — как статика, рендеринг по запросу — через @astrojs/cloudflare), Nuxt и SPA на React или Vue. Кроме этого в папке только references/skill-feedback.md для отчётов Cloudflare об ошибках в скилле.
Когда включать и когда не надо
Чтобы создать, перенести или задеплоить на Workers приложение на фреймворке.
Next.js скилл передаёт скиллу nextjs-on-cloudflare, а ещё упоминает общий скилл cloudflare; ни того, ни другого в этом пакете нашего каталога нет.
Как поставить и вызвать
Команда установки ниже скачивает SKILL.md, файл для обратной связи и лицензию. Поставьте также Wrangler CLI для Cloudflare и CLI cf для API Cloudflare — скилл передаёт работу им. Вызвать вручную:
- Claude Code:
/frameworks-on-cloudflareили попросить скилл по имени. - Codex:
$frameworks-on-cloudflare. - Cursor: наберите
/в чате Agent и выберитеframeworks-on-cloudflare.
Пример: /frameworks-on-cloudflare Перенеси это приложение на SvelteKit с Pages на Workers и проверь его локально до деплоя.
Чем отличается от похожих
Деплой на Vercel и Деплой на Netlify выкладывают проект прямо из чата. Деплой на Vercel от Vercel Labs сначала проверяет Git-remote и привязку проекта, а потом ведёт к деплою по git push. Деплой на Render деплоит из Git и описывает базы и фоновые сервисы в Blueprint-файле render.yaml. Своей команды деплоя у этого скилла нет: он подбирает адаптер и конфигурацию под фреймворк, а команды оставляет скиллам Wrangler и cf.
Установка
Выполните одну команду — она сохранит SKILL.md и файлы, которые он использует, в папку скиллов агента. Claude Code и Codex подхватывают новый скилл без перезапуска; если скилл не появился, перезапустите агента.
Скилл написан на английском — агент поймёт его и ответит вам по-русски.
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 }Другой агент: сохраните файл в его папку скиллов или дайте ему ссылку на файл: 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.
Подключить через AnyModel API
Скилл работает на той модели, которую использует агент. Подключите Claude Code, Codex или Cursor к AnyModel и запускайте его на Claude, GPT, Gemini и других моделях по одному ключу — оплата за токены, без подписки.
AnyModel