agentleFS
PanPanFRPanPanFR/oh-my-openkilo/skills/cloudflare/SKILL.md

cloudflare

Skill9 starsChanged 3 months agoMITView on GitHub

Unified Cloudflare platform skill - Workers, Durable Objects, Wrangler CLI, KV, D1, R2, AI, Vectorize, Queues, Workflows, Containers, Pages, security (WAF/DDoS/Turnstile), networking, IaC. Use for any Cloudflare task.

  • Reads credentials

37 other projects use a version of this, 18 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use cloudflare-one-migrations, cloudflare-email-service and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CloudflareSkill

    cloudflare-one-migrations

    Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.

    Also in 6 projects that use this

  • CloudflareSkill

    cloudflare-email-service

    Implement or troubleshoot Cloudflare Email Sending and Email Routing integrations and their delivery configuration.

    Also in 8 projects that use this

  • OpenAISkill

    workers-best-practices

    Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

    Also in 11 projects that use this

  • OpenAISkill

    durable-objects

    Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

    Also in 9 projects that use this

  • akornmeierSkill

    mongodb

    Guide for implementing MongoDB - a document database platform with CRUD operations, aggregation pipelines, indexing, replication, sharding, search capabilities, and comprehensive security. Use when working with MongoDB databases, designing schemas, writing queries, optimizing performance, configuring deployments (Atlas/self-managed/Kubernetes), implementing security, or integrating with applications through 15+ official drivers. (project)

    Also in 3 projects that use this

  • imehrSkill

    railway

    Railway.com deployment and management - deployment, logs, migrations, troubleshooting, monorepo strategies, security, and CLI reference. Use when deploying to Railway, configuring services, managing environment variables, or debugging deployment issues.

    Also in 3 projects that use this

  • +2 more from cloudflare
  • +3 more from openai

The file

Files
SKILL.md

Cloudflare Platform Skill (Unified)

Retrieval-first — fetch latest docs before citing numbers, APIs, config. When reference and docs disagree, trust the docs.

Retrieval Sources

SourceURLUse for
CF Docshttps://developers.cloudflare.com/Limits, pricing, API reference
Workers typesnpm pack @cloudflare/workers-typesType signatures, binding shapes
Wrangler schemanode_modules/wrangler/config-schema.jsonConfig fields, binding shapes
Changeloghttps://developers.cloudflare.com/changelog/Recent changes
Best Practiceshttps://developers.cloudflare.com/workers/best-practices/workers-best-practices/Canonical rules, anti-patterns
DO APIhttps://developers.cloudflare.com/durable-objects/api/DO methods, storage, alarms

Reference Map - load BEFORE that task

TaskRead FIRST
Any wrangler command, config fields, deploy/secrets/KV/R2/D1/Vectorize CLI usagereferences/wrangler-cli.md
Durable Objects code patterns (class setup, stubs, SQL/KV storage, alarms), rules & anti-patternsreferences/durable-objects.md

DECISION TREES

"I need to run code"

├─ Serverless edge functions → Workers
├─ Full-stack with Git deploys → Pages
├─ Stateful coordination/real-time → Durable Objects
├─ Long-running multi-step → Workflows
├─ Run containers → Containers
├─ Multi-tenant (customers deploy) → Workers for Platforms
├─ Scheduled tasks (cron) → Cron Triggers
├─ Lightweight edge logic (modify HTTP) → Snippets
├─ Process execution events (logs) → Tail Workers
└─ Optimize latency to backend → Smart Placement

"I need to store data"

├─ Key-value (config, sessions, cache) → KV
├─ Relational SQL → D1 (SQLite) or Hyperdrive (existing PG/MySQL)
├─ Object/file (S3-compatible) → R2
├─ Versioned file trees → Artifacts
├─ Message queue → Queues
├─ Vector embeddings → Vectorize
├─ Per-entity state → DO storage (SQLite)
├─ Secrets → Secrets Store
├─ Streaming ETL to R2 → Pipelines
├─ Managed Iceberg catalog → R2 Data Catalog
├─ Serverless SQL analytics → R2 SQL
└─ Persistent cache → Cache Reserve

"I need AI/ML"

├─ Run inference (LLMs, embeddings, images) → Workers AI
├─ Vector database for RAG/search → Vectorize
├─ Build stateful AI agents → Agents SDK
├─ Gateway for any AI provider → AI Gateway
└─ AI-powered search widget → AI Search

"I need security"

├─ WAF → WAF
├─ DDoS protection → DDoS
├─ Bot detection → Bot Management
├─ API protection → API Shield
├─ CAPTCHA alternative → Turnstile
└─ Credential leak detection → WAF (managed ruleset)

WORKERS BEST PRACTICES

Configuration

RuleSummary
compatibility_dateSet to today on new; update periodically
nodejs_compatEnable flag — many libs need Node.js built-ins
wrangler typesRun after config changes — never hand-write Env
SecretsUse wrangler secret put, never hardcode
wrangler.jsoncJSON config preferred; newer features JSON-only

Request & Response

RuleSummary
StreamingStream large/unknown payloads — never await response.text() on unbounded
waitUntilUse ctx.waitUntil() for post-response work; don't destructure ctx

Architecture

RuleSummary
Bindings over RESTUse in-process bindings (KV, R2, D1, Queues) not REST API
Queues & WorkflowsMove async work off critical path
Service bindingsWorker-to-Worker via service bindings, not public HTTP
HyperdriveAlways for external PG/MySQL connections

Security

RuleSummary
Web Cryptocrypto.randomUUID() / crypto.getRandomValues() — never Math.random()
No passThroughOnExceptionExplicit try/catch with structured errors

Anti-Patterns (NEVER)

Anti-patternWhy
await response.text() unboundedMemory exhaustion (128MB limit)
Hardcoded secretsCredential leak
Math.random() for tokensNot cryptographically secure
Bare fetch() no await/waitUntilFloating promise
Module-level mutable request stateCross-request data leaks
REST API from WorkerUnnecessary network hop, latency
ctx.passThroughOnException()Hides bugs
Hand-written EnvDrifts from wrangler config
Destructuring ctxLoses this binding
any on Env/paramsDefeats type safety
as unknown as T double-castHides type incompatibilities
implements on platform classesUse extends DurableObject/WorkerEntrypoint/Workflow
env.X inside platform classUse this.env.X

PRODUCT INDEX

  • Compute & Runtime: Workers, Pages, Durable Objects, Workflows, Containers, Workers for Platforms, Cron Triggers, Tail Workers, Snippets, Smart Placement
  • Storage & Data: KV, D1, R2, Artifacts, Queues, Hyperdrive, DO Storage, Secrets Store, Pipelines, R2 Data Catalog, R2 SQL
  • AI & ML: Workers AI, Vectorize, Agents SDK, AI Gateway, AI Search
  • Networking: Tunnel, Spectrum, TURN, Network Interconnect, Argo Smart Routing, Workers VPC
  • Security: WAF, DDoS, Bot Management, API Shield, Turnstile
  • Media: Images, Stream, Browser Rendering, Zaraz
  • IaC: Pulumi, Terraform, API
  • Other: Email Routing, Email Workers, Static Assets, Bindings, Cache Reserve, Flagship (feature flags)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.