cloudflare-deploy
The cloudflare-deploy skill deploys applications and infrastructure to Cloudflare's platform services, including Workers, Pages, Durable Objects, R2, D1, and related products. Use this skill when users request deployment, hosting, or setup on Cloudflare, relying on decision trees to route requests to the appropriate service and authentication checks before execution.
git clone --depth 1 https://github.com/tech-leads-club/agent-skills /tmp/cloudflare-deploy && cp -r /tmp/cloudflare-deploy/packages/skills-catalog/skills/(cloud)/cloudflare-deploy ~/.claude/skills/cloudflare-deploySKILL.md
# Cloudflare Deploy Consolidated skill for building on the Cloudflare platform. Use decision trees below to find the right product, then load detailed references. ## Prerequisites - When sandboxing blocks the deployment network calls, rerun with `sandbox_permissions=require_escalated`. - The deployment might take a few minutes. Use appropriate timeout values. ## Authentication (Required Before Deploy) Verify auth before `wrangler deploy`, `wrangler pages deploy`, or `npm run deploy`: ```bash npx wrangler whoami # Shows account if authenticated ``` Not authenticated? → `references/wrangler/auth.md` - Interactive/local: `wrangler login` (one-time OAuth) - CI/CD: Set `CLOUDFLARE_API_TOKEN` env var ## Quick Decision Trees ### "I need to run code" ``` Need to run code? ├─ Serverless functions at the edge → workers/ ├─ Full-stack web app with Git deploys → pages/ ├─ Stateful coordination/real-time → durable-objects/ ├─ Long-running multi-step jobs → workflows/ ├─ Run containers → containers/ ├─ Multi-tenant (customers deploy code) → workers-for-platforms/ ├─ Scheduled tasks (cron) → cron-triggers/ ├─ Lightweight edge logic (modify HTTP) → snippets/ ├─ Process Worker execution events (logs/observability) → tail-workers/ └─ Optimize latency to backend infrastructure → smart-placement/ ``` ### "I need to store data" ``` Need storage? ├─ Key-value (config, sessions, cache) → kv/ ├─ Relational SQL → d1/ (SQLite) or hyperdrive/ (existing Postgres/MySQL) ├─ Object/file storage (S3-compatible) → r2/ ├─ Message queue (async processing) → queues/ ├─ Vector embeddings (AI/semantic search) → vectorize/ ├─ Strongly-consistent per-entity state → durable-objects/ (DO storage) ├─ Secrets management → secrets-store/ ├─ Streaming ETL to R2 → pipelines/ └─ Persistent cache (long-term retention) → cache-reserve/ ``` ### "I need AI/ML" ``` Need AI? ├─ Run inference (LLMs, embeddings, images) → workers-ai/ ├─ Vector database for RAG/search → vectorize/ ├─ Build stateful AI agents → agents-sdk/ ├─ Gateway for any AI provider (caching, routing) → ai-gateway/ └─ AI-powered search widget → ai-search/ ``` ### "I need networking/connectivity" ``` Need networking? ├─ Expose local service to internet → tunnel/ ├─ TCP/UDP proxy (non-HTTP) → spectrum/ ├─ WebRTC TURN server → turn/ ├─ Private network connectivity → network-interconnect/ ├─ Optimize routing → argo-smart-routing/ ├─ Optimize latency to backend (not user) → smart-placement/ └─ Real-time video/audio → realtimekit/ or realtime-sfu/ ``` ### "I need security" ``` Need security? ├─ Web Application Firewall → waf/ ├─ DDoS protection → ddos/ ├─ Bot detection/management → bot-management/ ├─ API protection → api-shield/ ├─ CAPTCHA alternative → turnstile/ └─ Credential leak detection → waf/ (managed ruleset) ``` ### "I need media/content" ``` Need media? ├─ Image optimization/transformation → images/ ├─ Video streaming/encoding → stream/ ├─ Browser automation/screenshots → browser-rendering/ └─ Third-party script management → zaraz/ ``` ### "I need infrastructure-as-code" ``` Need IaC? → pulumi/ (Pulumi), terraform/ (Terraform), or api/ (REST API) ``` ## Product Index ### Compute & Runtime | Product | Reference | | --------------------- | ----------------------------------- | | Workers | `references/workers/` | | Pages | `references/pages/` | | Pages Functions | `references/pages-functions/` | | Durable Objects | `references/durable-objects/` | | Workflows | `references/workflows/` | | Containers | `references/containers/` | | Workers for Platforms | `references/workers-for-platforms/` | | Cron Triggers | `references/cron-triggers/` | | Tail Workers | `references/tail-workers/` | | Snippets | `references/snippets/` | | Smart Placement | `references/smart-placement/` | ### Storage & Data | Product | Reference | | --------------- | ----------------------------- | | KV | `references/kv/` | | D1 | `references/d1/` | | R2 | `references/r2/` | | Queues | `references/queues/` | | Hyperdrive | `references/hyperdrive/` | | DO Storage | `references/do-storage/` | | Secrets Store | `references/secrets-store/` | | Pipelines | `references/pipelines/` | | R2 Data Catalog | `references/r2-data-catalog/` | | R2 SQL | `references/r2-sql/` | ### AI & Machine Learning | Product | Reference | | ---------- | ------------------------ | | Workers AI | `references/workers-ai/` | | Vectorize | `references/vectorize/` | | Agents SDK | `references/agents-sdk/` | | AI Gateway | `references/ai-gateway/` | | AI Search | `references/ai-search/` | ### Networking & Connectivity | Product | Reference | | -------------------- | ---------------------------------- | | Tunnel | `references/tunnel/` | | Spectrum | `references/spectrum/` | | TURN | `references/turn/` | | Network Interconnect | `references/network-interconnect/` | | Argo Smart Routing | `references/argo-smart-routing/` | | Workers VPC | `references/workers-vpc/` | ### Security | Product | Reference | | --------------- | ---------------------------- | | WAF | `references/waf/` | | DDoS Protection | `references/ddos/` | | Bot Management | `references/bot-management/` | | API Shield | `references/api-shield/` | | Turnstile | `references/turnstile/` | ### Media & Content | Product | Reference | | ----------------- | -------
Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic duplicated?", "find common code between services", "what can be consolidated?", "detect shared domain logic", or analyzing component overlap before refactoring. Do NOT use for code-level duplication detection (use linters) or dependency analysis (use coupling-analysis).
Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at the root level. Use when asking "clean up component structure", "find orphaned classes", "fix module hierarchy", "flatten nested components", or analyzing why namespaces have misplaced code. Do NOT use for dependency analysis (use coupling-analysis) or domain grouping (use domain-identification-grouping).
Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use for runtime performance sizing or infrastructure capacity planning.
Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in Software Design". Use when asking "are these modules too coupled?", "show me dependencies", "analyze integration quality", "which modules should I decouple?", "coupling report", or evaluating architectural health. Do NOT use for domain boundary analysis (use domain-analysis) or component sizing (use component-identification-sizing).
Creates step-by-step decomposition plans and migration roadmaps for breaking apart monolithic applications. Use when asking "what order should I extract services?", "plan my migration", "create a decomposition roadmap", "prioritize what to split", "monolith to microservices strategy", or tracking decomposition progress. Do NOT use for domain analysis (use domain-analysis) or component sizing (use component-identification-sizing).
Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the domains in this codebase?", "where should I draw service boundaries?", "identify bounded contexts", "classify subdomains", "DDD analysis", or analyzing domain cohesion. Do NOT use for grouping existing components into domains (use domain-identification-grouping) or dependency analysis (use coupling-analysis).
Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components belong together?", "group these into services", "organize by domain", "component-to-domain mapping", or planning service extraction from an existing codebase. Do NOT use for identifying new domains from scratch (use domain-analysis) or analyzing coupling (use coupling-analysis).
AI frontend specialist and design consultant that guides users through a structured discovery process before generating any code. Collects visual references, design tokens, typography, icons, layout preferences, and brand guidelines to ensure the final output matches the user's vision with high fidelity. Use when the user asks to build, design, create, or improve any frontend interface — websites, landing pages, dashboards, components, apps, emails, forms, modals, or any UI element. Also triggers on "build me a UI", "design a page", "create a component", "improve this layout", "make this look better", "frontend", "interface", "redesign", or when the user provides mockups, screenshots, or design references. Do NOT use for backend logic, API design, database schemas, or non-visual code tasks.