Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: cloudflare3description: Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.4references:5- workers6- pages7- d18- durable-objects9- workers-ai10---1112# Cloudflare Platform Skill1314Consolidated skill for building on the Cloudflare platform. Use decision trees below to find the right product, then load detailed references.1516Your knowledge of Cloudflare APIs, types, limits, and pricing may be outdated. **Prefer retrieval over pre-training** — the references in this skill are starting points, not source of truth.1718## Retrieval Sources1920Fetch the **latest** information before citing specific numbers, API signatures, or configuration options. Do not rely on baked-in knowledge or these reference files alone.2122| Source | How to retrieve | Use for |23|--------|----------------|---------|24| Cloudflare docs | `cloudflare-docs` search tool or `https://developers.cloudflare.com/` | Limits, pricing, API reference, compatibility dates/flags |25| Workers types | `npm pack @cloudflare/workers-types` or check `node_modules` | Type signatures, binding shapes, handler types |26| Wrangler config schema | `node_modules/wrangler/config-schema.json` | Config fields, binding shapes, allowed values |27| Product changelogs | `https://developers.cloudflare.com/changelog/` | Recent changes to limits, features, deprecations |2829When a reference file and the docs disagree, **trust the docs**. This is especially important for: numeric limits, pricing tiers, type signatures, and configuration options.3031## Quick Decision Trees3233### "I need feature flags"3435```36Need feature flags?37└─ Feature toggles, targeting rules, percentage rollouts → flagship/38├─ Evaluate in Workers → Flagship binding (env.FLAGS)39├─ Evaluate in Node.js / browser → OpenFeature SDK (@cloudflare/flagship)40└─ Manage flags via API → Flagship REST API41```4243### "I need to run code"4445```46Need to run code?47├─ Serverless functions at the edge → workers/48├─ Full-stack web app with Git deploys → pages/49├─ Stateful coordination/real-time → durable-objects/50├─ Long-running multi-step jobs → workflows/51├─ Run containers → containers/52├─ Multi-tenant (customers deploy code) → workers-for-platforms/53├─ Scheduled tasks (cron) → cron-triggers/54├─ Lightweight edge logic (modify HTTP) → snippets/55├─ Process Worker execution events (logs/observability) → tail-workers/56└─ Optimize latency to backend infrastructure → smart-placement/57```5859### "I need to store data"6061```62Need storage?63├─ Key-value (config, sessions, cache) → kv/64├─ Relational SQL → d1/ (SQLite) or hyperdrive/ (existing Postgres/MySQL)65├─ Object/file storage (S3-compatible) → r2/66├─ Versioned file trees (repos, build outputs, checkpoints) → artifacts/67├─ Message queue (async processing) → queues/68├─ Vector embeddings (AI/semantic search) → vectorize/69├─ Strongly-consistent per-entity state → durable-objects/ (DO storage)70├─ Secrets management → secrets-store/71├─ Streaming ETL to R2 → pipelines/72└─ Persistent cache (long-term retention) → cache-reserve/73```7475### "I need AI/ML"7677```78Need AI?79├─ Run inference (LLMs, embeddings, images) → workers-ai/80├─ Vector database for RAG/search → vectorize/81├─ Build stateful AI agents → agents-sdk/82├─ Gateway for any AI provider (caching, routing) → ai-gateway/83└─ AI-powered search widget → ai-search/84```8586### "I need networking/connectivity"8788```89Need networking?90├─ Expose local service to internet → tunnel/91├─ TCP/UDP proxy (non-HTTP) → spectrum/92├─ WebRTC TURN server → turn/93├─ Private network connectivity → network-interconnect/94├─ Optimize routing → argo-smart-routing/95├─ Optimize latency to backend (not user) → smart-placement/96└─ Real-time video/audio → realtimekit/ or realtime-sfu/97```9899### "I need security"100101```102Need security?103├─ Web Application Firewall → waf/104├─ DDoS protection → ddos/105├─ Bot detection/management → bot-management/106├─ API protection → api-shield/107├─ CAPTCHA alternative → turnstile/108└─ Credential leak detection → waf/ (managed ruleset)109```110111### "I need media/content"112113```114Need media?115├─ Image optimization/transformation → images/116├─ Video streaming/encoding → stream/117├─ Browser automation/screenshots → browser-rendering/118└─ Third-party script management → zaraz/119```120121### "I need analytics/metrics data"122123```124Need analytics?125├─ Query across all Cloudflare products (HTTP, Workers, DNS, etc.) → graphql-api/126├─ Custom high-cardinality metrics from Workers → analytics-engine/127├─ Client-side (RUM) performance data → web-analytics/128├─ Workers Logs and real-time debugging → observability/129└─ Raw logs (Logpush to external tools) → Cloudflare docs130```131132### "I need infrastructure-as-code"133134```135Need IaC? → pulumi/ (Pulumi), terraform/ (Terraform), or api/ (REST API)136```137138## Product Index139140### Feature Flags141| Product | Reference |142|---------|-----------|143| Flagship | `references/flagship/` |144145### Compute & Runtime146| Product | Reference |147|---------|-----------|148| Workers | `references/workers/` |149| Pages | `references/pages/` |150| Pages Functions | `references/pages-functions/` |151| Durable Objects | `references/durable-objects/` |152| Workflows | `references/workflows/` |153| Containers | `references/containers/` |154| Workers for Platforms | `references/workers-for-platforms/` |155| Cron Triggers | `references/cron-triggers/` |156| Tail Workers | `references/tail-workers/` |157| Snippets | `references/snippets/` |158| Smart Placement | `references/smart-placement/` |159160### Storage & Data161| Product | Reference |162|---------|-----------|163| KV | `references/kv/` |164| D1 | `references/d1/` |165| R2 | `references/r2/` |166| Artifacts | `references/artifacts/` |167| Queues | `references/queues/` |168| Hyperdrive | `references/hyperdrive/` |169| DO Storage | `references/do-storage/` |170| Secrets Store | `references/secrets-store/` |171| Pipelines | `references/pipelines/` |172| R2 Data Catalog | `references/r2-data-catalog/` |173| R2 SQL | `references/r2-sql/` |174175### AI & Machine Learning176| Product | Reference |177|---------|-----------|178| Workers AI | `references/workers-ai/` |179| Vectorize | `references/vectorize/` |180| Agents SDK | `references/agents-sdk/` |181| AI Gateway | `references/ai-gateway/` |182| AI Search | `references/ai-search/` |183184### Networking & Connectivity185| Product | Reference |186|---------|-----------|187| Tunnel | `references/tunnel/` |188| Spectrum | `references/spectrum/` |189| TURN | `references/turn/` |190| Network Interconnect | `references/network-interconnect/` |191| Argo Smart Routing | `references/argo-smart-routing/` |192| Workers VPC | `references/workers-vpc/` |193194### Security195| Product | Reference |196|---------|-----------|197| WAF | `references/waf/` |198| DDoS Protection | `references/ddos/` |199| Bot Management | `references/bot-management/` |200| API Shield | `references/api-shield/` |201| Turnstile | `references/turnstile/` |202203### Media & Content204| Product | Reference |205|---------|-----------|206| Images | `references/images/` |207| Stream | `references/stream/` |208| Browser Rendering | `references/browser-rendering/` |209| Zaraz | `references/zaraz/` |210211### Real-Time Communication212| Product | Reference |213|---------|-----------|214| RealtimeKit | `references/realtimekit/` |215| Realtime SFU | `references/realtime-sfu/` |216217### Developer Tools218| Product | Reference |219|---------|-----------|220| Wrangler | `references/wrangler/` |221| Miniflare | `references/miniflare/` |222| C3 | `references/c3/` |223| Observability | `references/observability/` |224| GraphQL Analytics API | `references/graphql-api/` |225| Analytics Engine | `references/analytics-engine/` |226| Web Analytics | `references/web-analytics/` |227| Sandbox | `references/sandbox/` |228| Workerd | `references/workerd/` |229| Workers Playground | `references/workers-playground/` |230231### Infrastructure as Code232| Product | Reference |233|---------|-----------|234| Pulumi | `references/pulumi/` |235| Terraform | `references/terraform/` |236| API | `references/api/` |237238### Other Services239| Product | Reference |240|---------|-----------|241| Email Routing | `references/email-routing/` |242| Email Workers | `references/email-workers/` |243| Static Assets | `references/static-assets/` |244| Bindings | `references/bindings/` |245| Cache Reserve | `references/cache-reserve/` |246