Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
Add this skill
npx mdskills install openai/cloudflare-deployComprehensive decision trees and product index for Cloudflare platform deployment
1---2name: cloudflare-deploy3description: Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.4---56# Cloudflare Deploy78Consolidated skill for building on the Cloudflare platform. Use decision trees below to find the right product, then load detailed references.910## Prerequisites1112- When sandboxing blocks the deployment network calls, rerun with `sandbox_permissions=require_escalated`.13- The deployment might take a few minutes. Use appropriate timeout values.1415## Authentication (Required Before Deploy)1617Verify auth before `wrangler deploy`, `wrangler pages deploy`, or `npm run deploy`:1819```bash20npx wrangler whoami # Shows account if authenticated21```2223Not authenticated? → `references/wrangler/auth.md`24- Interactive/local: `wrangler login` (one-time OAuth)25- CI/CD: Set `CLOUDFLARE_API_TOKEN` env var2627## Quick Decision Trees2829### "I need to run code"3031```32Need to run code?33├─ Serverless functions at the edge → workers/34├─ Full-stack web app with Git deploys → pages/35├─ Stateful coordination/real-time → durable-objects/36├─ Long-running multi-step jobs → workflows/37├─ Run containers → containers/38├─ Multi-tenant (customers deploy code) → workers-for-platforms/39├─ Scheduled tasks (cron) → cron-triggers/40├─ Lightweight edge logic (modify HTTP) → snippets/41├─ Process Worker execution events (logs/observability) → tail-workers/42└─ Optimize latency to backend infrastructure → smart-placement/43```4445### "I need to store data"4647```48Need storage?49├─ Key-value (config, sessions, cache) → kv/50├─ Relational SQL → d1/ (SQLite) or hyperdrive/ (existing Postgres/MySQL)51├─ Object/file storage (S3-compatible) → r2/52├─ Message queue (async processing) → queues/53├─ Vector embeddings (AI/semantic search) → vectorize/54├─ Strongly-consistent per-entity state → durable-objects/ (DO storage)55├─ Secrets management → secrets-store/56├─ Streaming ETL to R2 → pipelines/57└─ Persistent cache (long-term retention) → cache-reserve/58```5960### "I need AI/ML"6162```63Need AI?64├─ Run inference (LLMs, embeddings, images) → workers-ai/65├─ Vector database for RAG/search → vectorize/66├─ Build stateful AI agents → agents-sdk/67├─ Gateway for any AI provider (caching, routing) → ai-gateway/68└─ AI-powered search widget → ai-search/69```7071### "I need networking/connectivity"7273```74Need networking?75├─ Expose local service to internet → tunnel/76├─ TCP/UDP proxy (non-HTTP) → spectrum/77├─ WebRTC TURN server → turn/78├─ Private network connectivity → network-interconnect/79├─ Optimize routing → argo-smart-routing/80├─ Optimize latency to backend (not user) → smart-placement/81└─ Real-time video/audio → realtimekit/ or realtime-sfu/82```8384### "I need security"8586```87Need security?88├─ Web Application Firewall → waf/89├─ DDoS protection → ddos/90├─ Bot detection/management → bot-management/91├─ API protection → api-shield/92├─ CAPTCHA alternative → turnstile/93└─ Credential leak detection → waf/ (managed ruleset)94```9596### "I need media/content"9798```99Need media?100├─ Image optimization/transformation → images/101├─ Video streaming/encoding → stream/102├─ Browser automation/screenshots → browser-rendering/103└─ Third-party script management → zaraz/104```105106### "I need infrastructure-as-code"107108```109Need IaC? → pulumi/ (Pulumi), terraform/ (Terraform), or api/ (REST API)110```111112## Product Index113114### Compute & Runtime115| Product | Reference |116|---------|-----------|117| Workers | `references/workers/` |118| Pages | `references/pages/` |119| Pages Functions | `references/pages-functions/` |120| Durable Objects | `references/durable-objects/` |121| Workflows | `references/workflows/` |122| Containers | `references/containers/` |123| Workers for Platforms | `references/workers-for-platforms/` |124| Cron Triggers | `references/cron-triggers/` |125| Tail Workers | `references/tail-workers/` |126| Snippets | `references/snippets/` |127| Smart Placement | `references/smart-placement/` |128129### Storage & Data130| Product | Reference |131|---------|-----------|132| KV | `references/kv/` |133| D1 | `references/d1/` |134| R2 | `references/r2/` |135| Queues | `references/queues/` |136| Hyperdrive | `references/hyperdrive/` |137| DO Storage | `references/do-storage/` |138| Secrets Store | `references/secrets-store/` |139| Pipelines | `references/pipelines/` |140| R2 Data Catalog | `references/r2-data-catalog/` |141| R2 SQL | `references/r2-sql/` |142143### AI & Machine Learning144| Product | Reference |145|---------|-----------|146| Workers AI | `references/workers-ai/` |147| Vectorize | `references/vectorize/` |148| Agents SDK | `references/agents-sdk/` |149| AI Gateway | `references/ai-gateway/` |150| AI Search | `references/ai-search/` |151152### Networking & Connectivity153| Product | Reference |154|---------|-----------|155| Tunnel | `references/tunnel/` |156| Spectrum | `references/spectrum/` |157| TURN | `references/turn/` |158| Network Interconnect | `references/network-interconnect/` |159| Argo Smart Routing | `references/argo-smart-routing/` |160| Workers VPC | `references/workers-vpc/` |161162### Security163| Product | Reference |164|---------|-----------|165| WAF | `references/waf/` |166| DDoS Protection | `references/ddos/` |167| Bot Management | `references/bot-management/` |168| API Shield | `references/api-shield/` |169| Turnstile | `references/turnstile/` |170171### Media & Content172| Product | Reference |173|---------|-----------|174| Images | `references/images/` |175| Stream | `references/stream/` |176| Browser Rendering | `references/browser-rendering/` |177| Zaraz | `references/zaraz/` |178179### Real-Time Communication180| Product | Reference |181|---------|-----------|182| RealtimeKit | `references/realtimekit/` |183| Realtime SFU | `references/realtime-sfu/` |184185### Developer Tools186| Product | Reference |187|---------|-----------|188| Wrangler | `references/wrangler/` |189| Miniflare | `references/miniflare/` |190| C3 | `references/c3/` |191| Observability | `references/observability/` |192| Analytics Engine | `references/analytics-engine/` |193| Web Analytics | `references/web-analytics/` |194| Sandbox | `references/sandbox/` |195| Workerd | `references/workerd/` |196| Workers Playground | `references/workers-playground/` |197198### Infrastructure as Code199| Product | Reference |200|---------|-----------|201| Pulumi | `references/pulumi/` |202| Terraform | `references/terraform/` |203| API | `references/api/` |204205### Other Services206| Product | Reference |207|---------|-----------|208| Email Routing | `references/email-routing/` |209| Email Workers | `references/email-workers/` |210| Static Assets | `references/static-assets/` |211| Bindings | `references/bindings/` |212| Cache Reserve | `references/cache-reserve/` |213214## Troubleshooting215216### Escalated Network Access217218If deployment fails due to network issues (timeouts, DNS errors, connection resets), rerun the deploy with escalated permissions (use `sandbox_permissions=require_escalated`). The deploy requires escalated network access when sandbox networking blocks outbound requests.219220Example guidance to the user:221222```223The deploy needs escalated network access to deploy to Cloudflare. I can rerun the command with escalated permissions—want me to proceed?224```225
Full transparency — inspect the skill content before installing.