Cloudflare
OpenAIOfficialCreated by CloudflareDistributed by OpenAI
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Cloudflare platform skill provides a centralized resource for developers building on Cloudflare's edge network. It covers the full ecosystem, including compute (Workers, Pages), storage (KV, D1, R2), AI integration (Workers AI, Agents SDK), networking, and security. The skill emphasizes a retrieval-first approach, directing users to official Cloudflare documentation and configuration schemas to ensure accuracy regarding API signatures, limits, and pricing.
What it does
- Provides decision trees to help select the right Cloudflare product for specific compute, storage, or networking needs.
- Offers structured references for the Cloudflare Agents SDK, including lifecycle hooks and state management.
- Guides users on integrating AI models and vector databases into edge applications.
- Outlines methods for managing infrastructure-as-code using Terraform or Pulumi.
- Facilitates access to product-specific documentation for security, media, and analytics services.
- Maintains a directory of developer tools like Wrangler and Miniflare for local development and testing.
When to use it
- When starting a new project on the Cloudflare platform and needing to choose the appropriate architecture.
- When implementing stateful AI agents using the Cloudflare Agents SDK.
- When configuring edge compute, storage bindings, or networking rules.
- When troubleshooting API limits, configuration errors, or deployment issues.
- When integrating AI models or vector search into existing edge applications.
Advantages
- Consolidates a vast ecosystem into a navigable, task-oriented structure.
- Promotes the use of official, up-to-date documentation over potentially stale training data.
- Simplifies complex architectural decisions through clear, logic-based decision trees.
- Provides specific code patterns for advanced features like Durable Objects and AI agents.
- Supports modern infrastructure-as-code workflows for consistent deployments.
Usage examples
- “I need to build a stateful AI chat agent on Cloudflare. How do I start?”
- The agent will guide you to use the AIChatAgent class from the Agents SDK, explain how to manage message history, and provide a template for integrating AI models.
- “Which storage solution should I use for relational data in my Worker?”
- The agent will point you to D1 for SQLite-based relational storage or Hyperdrive for connecting to existing Postgres/MySQL databases.
- “How do I expose my local development server to the internet via Cloudflare?”
- The agent will provide instructions on using Cloudflare Tunnel to securely connect your local service to the Cloudflare edge.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/openai/cloudflare/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip cloudflare.zip -d .agents/skills
Documentation by Cloudflare
Cloudflare Platform Skill
Consolidated skill for building on the Cloudflare platform. Use decision trees below to find the right product, then load detailed references.
Your 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.
Retrieval Sources
Fetch the latest information before citing specific numbers, API signatures, or configuration options. Do not rely on baked-in knowledge or these reference files alone.
| Source | How to retrieve | Use for |
|---|---|---|
| Cloudflare docs | Search https://developers.cloudflare.com/ directly | Limits, pricing, API reference, compatibility dates/flags |
| Workers types | npm pack @cloudflare/workers-types or check node_modules | Type signatures, binding shapes, handler types |
| Wrangler config schema | node_modules/wrangler/config-schema.json | Config fields, binding shapes, allowed values |
| Product changelogs | https://developers.cloudflare.com/changelog/ | Recent changes to limits, features, deprecations |
When a reference file and the docs disagree, trust the docs. This is especially important for: numeric limits, pricing tiers, type signatures, and configuration options.
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 analytics/metrics data"
Need analytics?
├─ Query across all Cloudflare products (HTTP, Workers, DNS, etc.) → graphql-api/
├─ Custom high-cardinality metrics from Workers → analytics-engine/
├─ Client-side (RUM) performance data → web-analytics/
├─ Workers Logs and real-time debugging → observability/
└─ Raw logs (Logpush to external tools) → Cloudflare docs"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 |
|---|---|
| Images | references/images/ |
| Stream | references/stream/ |
| Browser Rendering | references/browser-rendering/ |
| Zaraz | references/zaraz/ |
Real-Time Communication
| Product | Reference |
|---|---|
| RealtimeKit | references/realtimekit/ |
| Realtime SFU | references/realtime-sfu/ |
Developer Tools
| Product | Reference |
|---|---|
| Wrangler | references/wrangler/ |
| Miniflare | references/miniflare/ |
| C3 | references/c3/ |
| Observability | references/observability/ |
| GraphQL Analytics API | references/graphql-api/ |
| Analytics Engine | references/analytics-engine/ |
| Web Analytics | references/web-analytics/ |
| Sandbox | references/sandbox/ |
| Workerd | references/workerd/ |
| Workers Playground | references/workers-playground/ |
Infrastructure as Code
| Product | Reference |
|---|---|
| Pulumi | references/pulumi/ |
| Terraform | references/terraform/ |
| API | references/api/ |
Other Services
| Product | Reference |
|---|---|
| Email Routing | references/email-routing/ |
| Email Workers | references/email-workers/ |
| Static Assets | references/static-assets/ |
| Bindings | references/bindings/ |
| Cache Reserve | references/cache-reserve/ |
Files
- ATTRIBUTION.mdAdded by AutoGineer906 B
- LICENSE.txt10.5 KiB
- SKILL.md8.0 KiB
- agents/openai.yaml375 B
- assets/cloudflare-small.svg1.2 KiB
- assets/cloudflare.png1.2 KiB
- references/agents-sdk/README.md2.7 KiB
- references/agents-sdk/api.md5.7 KiB
- references/agents-sdk/configuration.md3.5 KiB
- references/agents-sdk/gotchas.md5.0 KiB
- references/agents-sdk/patterns.md5.4 KiB
- references/ai-gateway/README.md6.2 KiB
- references/ai-gateway/configuration.md2.9 KiB
- references/ai-gateway/dynamic-routing.md1.8 KiB
- references/ai-gateway/features.md2.7 KiB
- references/ai-gateway/sdk-integration.md2.6 KiB
- references/ai-gateway/troubleshooting.md2.4 KiB
- references/ai-search/README.md4.4 KiB
- references/ai-search/api.md2.5 KiB
- references/ai-search/configuration.md1.7 KiB
- references/ai-search/gotchas.md2.1 KiB
- references/ai-search/patterns.md2.0 KiB
- references/analytics-engine/README.md3.1 KiB
- references/analytics-engine/api.md3.1 KiB
- references/analytics-engine/configuration.md2.3 KiB
- references/analytics-engine/gotchas.md2.0 KiB
- references/analytics-engine/patterns.md2.3 KiB
- references/api-shield/README.md1.8 KiB
- references/api-shield/api.md3.8 KiB
- references/api-shield/configuration.md4.9 KiB
- references/api-shield/gotchas.md4.8 KiB
- references/api-shield/patterns.md5.7 KiB
- references/api/README.md2.3 KiB
- references/api/api.md4.2 KiB
- references/api/configuration.md3.7 KiB
- references/api/gotchas.md5.3 KiB
- references/api/patterns.md4.5 KiB
- references/argo-smart-routing/README.md4.0 KiB
- references/argo-smart-routing/api.md6.4 KiB
- references/argo-smart-routing/configuration.md4.3 KiB
- references/argo-smart-routing/gotchas.md4.2 KiB
- references/argo-smart-routing/patterns.md3.0 KiB
- references/bindings/README.md3.9 KiB
- references/bindings/api.md5.1 KiB
- references/bindings/configuration.md4.4 KiB
- references/bindings/gotchas.md6.0 KiB
- references/bindings/patterns.md4.9 KiB
- references/bot-management/README.md3.7 KiB
- references/bot-management/api.md5.6 KiB
- references/bot-management/configuration.md5.6 KiB
- references/bot-management/gotchas.md5.5 KiB
- references/bot-management/patterns.md4.8 KiB
- references/browser-rendering/README.md3.0 KiB
- references/browser-rendering/api.md2.9 KiB
- references/browser-rendering/configuration.md1.8 KiB
- references/browser-rendering/gotchas.md2.5 KiB
- references/browser-rendering/patterns.md2.6 KiB
- references/c3/README.md3.3 KiB
- references/c3/api.md2.2 KiB
- references/c3/configuration.md1.6 KiB
- references/c3/gotchas.md2.2 KiB
- references/c3/patterns.md2.1 KiB
- references/cache-reserve/README.md5.5 KiB
- references/cache-reserve/api.md5.9 KiB
- references/cache-reserve/configuration.md3.6 KiB
- references/cache-reserve/gotchas.md5.6 KiB
- references/cache-reserve/patterns.md6.1 KiB
- references/containers/README.md3.4 KiB
- references/containers/api.md4.2 KiB
- references/containers/configuration.md5.3 KiB
- references/containers/gotchas.md4.4 KiB
- references/containers/patterns.md4.8 KiB
- references/cron-triggers/README.md2.9 KiB
- references/cron-triggers/api.md5.7 KiB
- references/cron-triggers/configuration.md4.1 KiB
- references/cron-triggers/gotchas.md6.1 KiB
- references/cron-triggers/patterns.md6.8 KiB
- references/d1/README.md4.6 KiB
- references/d1/api.md6.6 KiB
- references/d1/configuration.md5.3 KiB
- references/d1/gotchas.md4.2 KiB
- references/d1/patterns.md7.1 KiB
- references/ddos/README.md2.0 KiB
- references/ddos/api.md4.1 KiB
- references/ddos/configuration.md2.9 KiB
- references/ddos/gotchas.md3.8 KiB
- references/ddos/patterns.md5.5 KiB
- references/do-storage/README.md2.7 KiB
- references/do-storage/api.md3.5 KiB
- references/do-storage/configuration.md2.2 KiB
- references/do-storage/gotchas.md5.1 KiB
- references/do-storage/patterns.md5.1 KiB
- references/do-storage/testing.md4.8 KiB
- references/durable-objects/README.md6.4 KiB
- references/durable-objects/api.md6.0 KiB
- references/durable-objects/configuration.md4.2 KiB
- references/durable-objects/gotchas.md7.1 KiB
- references/durable-objects/patterns.md6.5 KiB
- references/email-routing/README.md3.3 KiB
- references/email-routing/api.md5.2 KiB
- references/email-routing/configuration.md3.5 KiB
- references/email-routing/gotchas.md4.0 KiB
- references/email-routing/patterns.md5.3 KiB
- references/email-workers/README.md5.2 KiB
- references/email-workers/api.md5.9 KiB
- references/email-workers/configuration.md2.7 KiB
- references/email-workers/gotchas.md3.0 KiB
- references/email-workers/patterns.md2.7 KiB
- references/graphql-api/README.md7.6 KiB
- references/graphql-api/api.md5.6 KiB
- references/graphql-api/configuration.md4.6 KiB
- references/graphql-api/gotchas.md4.7 KiB
- references/graphql-api/patterns.md6.4 KiB
- references/hyperdrive/README.md2.8 KiB
- references/hyperdrive/api.md3.8 KiB
- references/hyperdrive/configuration.md3.8 KiB
- references/hyperdrive/gotchas.md3.8 KiB
- references/hyperdrive/patterns.md5.8 KiB
- references/images/README.md2.8 KiB
- references/images/api.md2.5 KiB
- references/images/configuration.md4.0 KiB
- references/images/gotchas.md2.4 KiB
- references/images/patterns.md3.5 KiB
- references/kv/README.md2.8 KiB
- references/kv/api.md4.2 KiB
- references/kv/configuration.md3.0 KiB
- references/kv/gotchas.md4.3 KiB
- references/kv/patterns.md4.6 KiB
- references/miniflare/README.md2.9 KiB
- references/miniflare/api.md4.5 KiB
- references/miniflare/configuration.md3.4 KiB
- references/miniflare/gotchas.md3.6 KiB
- references/miniflare/patterns.md4.2 KiB
- references/network-interconnect/README.md3.2 KiB
- references/network-interconnect/api.md5.5 KiB
- references/network-interconnect/configuration.md4.2 KiB
- references/network-interconnect/gotchas.md5.4 KiB
- references/network-interconnect/patterns.md3.9 KiB
- references/observability/README.md3.8 KiB
- references/observability/api.md3.4 KiB
- references/observability/configuration.md3.5 KiB
- references/observability/gotchas.md3.7 KiB
- references/observability/patterns.md2.4 KiB
- references/pages-functions/README.md3.2 KiB
- references/pages-functions/api.md4.6 KiB
- references/pages-functions/configuration.md2.9 KiB
- references/pages-functions/gotchas.md3.8 KiB
- references/pages-functions/patterns.md4.1 KiB
- references/pages/README.md2.8 KiB
- references/pages/api.md5.8 KiB
- references/pages/configuration.md5.7 KiB
- references/pages/gotchas.md7.7 KiB
- references/pages/patterns.md5.8 KiB
- references/pipelines/README.md3.3 KiB
- references/pipelines/api.md5.0 KiB
- references/pipelines/configuration.md2.7 KiB
- references/pipelines/gotchas.md2.4 KiB
- references/pipelines/patterns.md2.0 KiB
- references/pulumi/README.md3.2 KiB
- references/pulumi/api.md5.6 KiB
- references/pulumi/configuration.md5.5 KiB
- references/pulumi/gotchas.md6.3 KiB
- references/pulumi/patterns.md6.8 KiB
- references/queues/README.md3.0 KiB
- references/queues/api.md5.4 KiB
- references/queues/configuration.md3.7 KiB
- references/queues/gotchas.md7.0 KiB
- references/queues/patterns.md5.4 KiB
- references/r2-data-catalog/README.md6.9 KiB
- references/r2-data-catalog/api.md5.9 KiB
- references/r2-data-catalog/configuration.md5.2 KiB
- references/r2-data-catalog/gotchas.md5.9 KiB
- references/r2-data-catalog/patterns.md5.7 KiB
- references/r2-sql/README.md5.1 KiB
- references/r2-sql/api.md3.9 KiB
- references/r2-sql/configuration.md3.7 KiB
- references/r2-sql/gotchas.md6.1 KiB
- references/r2-sql/patterns.md6.6 KiB
- references/r2/README.md2.8 KiB
- references/r2/api.md5.5 KiB
- references/r2/configuration.md3.6 KiB
- references/r2/gotchas.md4.9 KiB
- references/r2/patterns.md5.7 KiB
- references/realtime-sfu/README.md3.0 KiB
- references/realtime-sfu/api.md3.7 KiB
- references/realtime-sfu/configuration.md3.4 KiB
- references/realtime-sfu/gotchas.md4.8 KiB
- references/realtime-sfu/patterns.md5.3 KiB
- references/realtimekit/README.md4.0 KiB
- references/realtimekit/api.md8.2 KiB
- references/realtimekit/configuration.md5.1 KiB
- references/realtimekit/gotchas.md6.7 KiB
- references/realtimekit/patterns.md7.5 KiB
- references/sandbox/README.md3.0 KiB
- references/sandbox/api.md4.8 KiB
- references/sandbox/configuration.md3.3 KiB
- references/sandbox/gotchas.md5.3 KiB
- references/sandbox/patterns.md5.0 KiB
- references/secrets-store/README.md2.2 KiB
- references/secrets-store/api.md4.3 KiB
- references/secrets-store/configuration.md3.8 KiB
- references/secrets-store/gotchas.md3.7 KiB
- references/secrets-store/patterns.md5.5 KiB
- references/smart-placement/README.md4.9 KiB
- references/smart-placement/api.md5.4 KiB
- references/smart-placement/configuration.md6.0 KiB
- references/smart-placement/gotchas.md5.5 KiB
- references/smart-placement/patterns.md5.6 KiB
- references/snippets/README.md3.1 KiB
- references/snippets/api.md5.0 KiB
- references/snippets/configuration.md6.2 KiB
- references/snippets/gotchas.md2.2 KiB
- references/snippets/patterns.md3.3 KiB
- references/spectrum/README.md2.3 KiB
- references/spectrum/api.md4.8 KiB
- references/spectrum/configuration.md4.2 KiB
- references/spectrum/gotchas.md3.6 KiB
- references/spectrum/patterns.md4.7 KiB
- references/static-assets/README.md2.1 KiB
- references/static-assets/api.md4.3 KiB
- references/static-assets/configuration.md4.7 KiB
- references/static-assets/gotchas.md4.0 KiB
- references/static-assets/patterns.md4.8 KiB
- references/stream/README.md3.8 KiB
- references/stream/api-live.md5.0 KiB
- references/stream/api.md5.1 KiB
- references/stream/configuration.md3.1 KiB
- references/stream/gotchas.md4.2 KiB
- references/stream/patterns.md6.2 KiB
- references/tail-workers/README.md2.9 KiB
- references/tail-workers/api.md5.0 KiB
- references/tail-workers/configuration.md3.4 KiB
- references/tail-workers/gotchas.md4.5 KiB
- references/tail-workers/patterns.md3.9 KiB
- references/terraform/README.md3.6 KiB
- references/terraform/api.md3.9 KiB
- references/terraform/configuration.md7.4 KiB
- references/terraform/gotchas.md5.1 KiB
- references/terraform/patterns.md6.5 KiB
- references/tunnel/README.md3.6 KiB
- references/tunnel/api.md4.3 KiB
- references/tunnel/configuration.md3.6 KiB
- references/tunnel/gotchas.md3.8 KiB
- references/tunnel/networking.md3.9 KiB
- references/tunnel/patterns.md3.8 KiB
- references/turn/README.md3.6 KiB
- references/turn/api.md5.1 KiB
- references/turn/configuration.md4.1 KiB
- references/turn/gotchas.md6.9 KiB
- references/turn/patterns.md6.0 KiB
- references/turnstile/README.md3.4 KiB
- references/turnstile/api.md6.3 KiB
- references/turnstile/configuration.md6.6 KiB
- references/turnstile/gotchas.md6.1 KiB
- references/turnstile/patterns.md4.5 KiB
- references/vectorize/README.md4.2 KiB
- references/vectorize/api.md2.3 KiB
- references/vectorize/configuration.md1.9 KiB
- references/vectorize/gotchas.md2.1 KiB
- references/vectorize/patterns.md2.5 KiB
- references/waf/README.md3.4 KiB
- references/waf/api.md5.7 KiB
- references/waf/configuration.md4.7 KiB
- references/waf/gotchas.md6.1 KiB
- references/waf/patterns.md5.2 KiB
- references/web-analytics/README.md5.1 KiB
- references/web-analytics/configuration.md2.0 KiB
- references/web-analytics/gotchas.md1.9 KiB
- references/web-analytics/integration.md1.7 KiB
- references/web-analytics/patterns.md2.2 KiB
- references/workerd/README.md2.7 KiB
- references/workerd/api.md4.8 KiB
- references/workerd/configuration.md5.1 KiB
- references/workerd/gotchas.md4.7 KiB
- references/workerd/patterns.md4.8 KiB
- references/workers-ai/README.md5.9 KiB
- references/workers-ai/api.md2.7 KiB
- references/workers-ai/configuration.md1.9 KiB
- references/workers-ai/gotchas.md2.6 KiB
- references/workers-ai/patterns.md3.0 KiB
- references/workers-for-platforms/README.md3.8 KiB
- references/workers-for-platforms/api.md5.4 KiB
- references/workers-for-platforms/configuration.md3.8 KiB
- references/workers-for-platforms/gotchas.md5.3 KiB
- references/workers-for-platforms/patterns.md5.4 KiB
- references/workers-playground/README.md3.9 KiB
- references/workers-playground/api.md2.2 KiB
- references/workers-playground/configuration.md4.4 KiB
- references/workers-playground/gotchas.md2.0 KiB
- references/workers-playground/patterns.md3.2 KiB
- references/workers-vpc/README.md5.3 KiB
- references/workers-vpc/api.md5.2 KiB
- references/workers-vpc/configuration.md3.8 KiB
- references/workers-vpc/gotchas.md4.4 KiB
- references/workers-vpc/patterns.md5.9 KiB
- references/workers/README.md3.4 KiB
- references/workers/api.md5.0 KiB
- references/workers/configuration.md4.2 KiB
- references/workers/frameworks.md4.2 KiB
- references/workers/gotchas.md4.6 KiB
- references/workers/patterns.md5.3 KiB
- references/workflows/README.md2.4 KiB
- references/workflows/api.md6.3 KiB
- references/workflows/configuration.md3.6 KiB
- references/workflows/gotchas.md4.5 KiB
- references/workflows/patterns.md6.5 KiB
- references/wrangler/README.md4.6 KiB
- references/wrangler/api.md4.5 KiB
- references/wrangler/configuration.md4.6 KiB
- references/wrangler/gotchas.md5.7 KiB
- references/wrangler/patterns.md4.8 KiB
- references/zaraz/IMPLEMENTATION_SUMMARY.md3.4 KiB
- references/zaraz/README.md3.8 KiB
- references/zaraz/api.md3.1 KiB
- references/zaraz/configuration.md1.8 KiB
- references/zaraz/gotchas.md2.0 KiB
- references/zaraz/patterns.md2.1 KiB
references/api-shield/patterns.md
Patterns & Use Cases
Protect API with Schema + JWT
# 1. Upload OpenAPI schema
POST /zones/{zone_id}/api_gateway/user_schemas
# 2. Configure JWT validation
POST /zones/{zone_id}/api_gateway/token_validation
{
"name": "Auth0",
"location": {"header": "Authorization"},
"jwks": "{...}"
}
# 3. Create JWT rule
POST /zones/{zone_id}/api_gateway/jwt_validation_rules
# 4. Set schema validation action
PUT /zones/{zone_id}/api_gateway/settings/schema_validation
{"validation_default_mitigation_action": "block"}Progressive Rollout
1. Log mode: Observe false positives
- Schema: Action = Log
- JWT: Action = Log
2. Block subset: Protect critical endpoints
- Change specific endpoint actions to Block
- Monitor firewall events
3. Full enforcement: Block all violations
- Change default action to Block
- Handle fallthrough with custom ruleBOLA Detection
Enumeration Detection
Detects sequential resource access (e.g., /users/1, /users/2, /users/3).
// Block BOLA enumeration attempts
(cf.api_gateway.cf-risk-bola-enumeration and http.host eq "api.example.com")
// Action: Block or ChallengeParameter Pollution
Detects duplicate/excessive parameters in requests.
// Block parameter pollution
(cf.api_gateway.cf-risk-bola-pollution and http.host eq "api.example.com")
// Action: BlockCombined BOLA Protection
// Comprehensive BOLA rule
(cf.api_gateway.cf-risk-bola-enumeration or cf.api_gateway.cf-risk-bola-pollution)
and http.host eq "api.example.com"
// Action: BlockAuthentication Posture
Detect Missing Auth
// Log endpoints lacking authentication
(cf.api_gateway.cf-risk-missing-auth and http.host eq "api.example.com")
// Action: Log (for audit)Detect Mixed Auth
// Alert on inconsistent auth patterns
(cf.api_gateway.cf-risk-mixed-auth and http.host eq "api.example.com")
// Action: Log (review required)Fallthrough Detection (Shadow APIs)
// WAF Custom Rule
(cf.api_gateway.fallthrough_triggered and http.host eq "api.example.com")
// Action: Log (discover unknown) or Block (strict)Rate Limiting by User
// Rate Limiting Rule (modern syntax)
(http.host eq "api.example.com" and
is_jwt_valid(http.request.jwt.payload["{config_id}"][0]))
// Rate: 100 req/60s
// Counting expression: lookup_json_string(http.request.jwt.payload["{config_id}"][0], "sub")Volumetric Abuse Response
// Detect abnormal traffic spikes
(cf.api_gateway.volumetric_abuse_detected and http.host eq "api.example.com")
// Action: Challenge or Rate Limit
// Combined with rate limiting
(cf.api_gateway.volumetric_abuse_detected or
cf.threat_score gt 50) and http.host eq "api.example.com"
// Action: JS ChallengeGraphQL Protection
// Block oversized queries
(http.request.uri.path eq "/graphql" and
cf.api_gateway.graphql_query_size gt 100000)
// Action: Block
// Block deep nested queries
(http.request.uri.path eq "/graphql" and
cf.api_gateway.graphql_query_depth gt 10)
// Action: BlockArchitecture Patterns
Public API: Discovery + Schema Validation 2.0 + JWT + Rate Limiting + Bot Management Partner API: mTLS + Schema Validation + Sequence Mitigation Internal API: Discovery + Schema Learning + Auth Posture
OWASP API Security Top 10 Mapping (2026)
| OWASP Issue | API Shield Solutions |
|---|---|
| API1:2023 Broken Object Level Authorization | BOLA Detection (enumeration + pollution), Sequence mitigation, Schema, JWT, Rate Limiting |
| API2:2023 Broken Authentication | Auth Posture, mTLS, JWT validation, Bot Management |
| API3:2023 Broken Object Property Auth | Schema validation, JWT validation |
| API4:2023 Unrestricted Resource Access | Rate Limiting, Volumetric Abuse Detection, GraphQL Protection, Bot Management |
| API5:2023 Broken Function Level Auth | Schema validation, JWT validation, Auth Posture |
| API6:2023 Unrestricted Business Flows | Sequence mitigation, Bot Management |
| API7:2023 SSRF | Schema validation, WAF managed rules |
| API8:2023 Security Misconfiguration | Schema Validation 2.0, Auth Posture, WAF rules |
| API9:2023 Improper Inventory Management | API Discovery, Schema learning, Auth Posture |
| API10:2023 Unsafe API Consumption | JWT validation, Schema validation, WAF managed |
Monitoring
Security Events: Security > Events → Filter: Action = block, Service = API Shield
Firewall Analytics: Analytics > Security → Filter by cf.api_gateway.* fields
Logpush fields: APIGatewayAuthIDPresent, APIGatewayRequestViolatesSchema, APIGatewayFallthroughDetected, JWTValidationResult
Availability (2026)
| Feature | Availability | Notes |
|---|---|---|
| mTLS (CF-managed CA) | All plans | Self-service |
| Endpoint Management | All plans | Limited operations |
| Schema Validation 2.0 | All plans | Limited operations |
| API Discovery | Enterprise | 10K+ ops |
| JWT Validation | Enterprise add-on | Full validation |
| BOLA Detection | Enterprise add-on | Requires session IDs |
| Auth Posture | Enterprise add-on | Security audit |
| Volumetric Abuse Detection | Enterprise add-on | Traffic analysis |
| GraphQL Protection | Enterprise add-on | Query limits |
| Sequence Mitigation | Enterprise (beta) | Contact team |
| Full Suite | Enterprise add-on | All features |
Enterprise limits: 10K operations (contact for higher). Preview access available for non-contract evaluation.
See Also
configuration.md - Setup all features before creating rules
api.md - Firewall field reference and API endpoints
gotchas.md - Common issues and limits
Requirements and compatibility
Written for: OpenAI Codex
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Medium risk
- Possible data-exfiltration endpoints
- Instructions that use the network
- Downloads piped into a shell
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Cloudflare
- Publisher
- OpenAI (Official)
- Distributed by
- OpenAI
- Source
- openai/plugins · plugins/cloudflare/skills/cloudflare · commit d420d13
- Licence
- Apache License 2.0 (redistribution allowed)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Cloudflare or OpenAI.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cloudflare.zip