Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbookWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/401-cloudflare-workers)<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/401-cloudflare-workers"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/401-cloudflare-workers/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/401-cloudflare-workers"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/401-cloudflare-workers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.04185 |
| Opus 5.5 | $0.00036 | $0.01674 |
| Sonnet 5.5 | $0.00018 | $0.00837 |
| Haiku 4.5 | $0.00009 | $0.00419 |
Grade A, and why
401-cloudflare-workers scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **Module Workers** (`export default { fetch(req, env, ctx) { ... } }`) - the modern model. Bindings come through `env`; lifecycle through `ctx`; supports TypeScript natively; supports RPC via `WorkerEntrypoint`; suppor How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Workers (TypeScript, Module Workers, typed bindings)
Audience: anyone authoring or reviewing a Cloudflare Worker - default-export Worker, named entrypoint, Durable Object, Workflow, Queue consumer, Cron Trigger, Email Worker, or Pages Function.
Relationship to other rules:
400-cloudflare.mdc- broad Cloudflare platform playbook (Workers + Access + AOP + WAF + Workflows + etc.). This file is the file-scoped Worker-authoring tightening.405-cloudflare-waf-rules.mdc- file-scoped WAF rule playbook. Same pattern (file-scoped tactical rule).225-javascript-typescript.mdc- general JavaScript and TypeScript gates. This file layers Workers-specific TypeScript rules on top.320-api-design.mdc- REST API design. Applies when the Worker exposes HTTP endpoints.325-networking.mdc- HTTP / gRPC client reuse, idle timeouts. Workers have specific subrequest semantics covered here.
Companion skill: cloudflare-workers-author walks through the bootstrap, bindings choice, routing, testing, and deployment workflow. This rule is the gate; the skill is the workflow through the gate.
[!IMPORTANT] The non-negotiables below are file-scoped. They auto-load when editing
wrangler.jsonc(or common Worker entry-point names). If you're authoring a Worker in an unusual location, invoke this rule explicitly or trigger topic discovery by mentioning Cloudflare Workers in the conversation.
Non-negotiables
NN-1: Module Workers syntax only (Service Worker syntax is forbidden in new code)
Cloudflare Workers has two execution models:
- Module Workers (
export default { fetch(req, env, ctx) { ... } }) - the modern model. Bindings come throughenv; lifecycle throughctx; supports TypeScript natively; supports RPC viaWorkerEntrypoint; supports Durable Objects, Workflows, RPC, Queues, Cron, Email, etc. - Service Worker (
addEventListener("fetch", event => { ... })) - the original model. Deprecated for new development. Bindings come through global scope; no RPC; no named entrypoints; nocloudflare:workersmodule imports.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 354 lines · 91 tokens per session scan A de27cac88f7c
401-cloudflare-workers is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (20 stars, last pushed today), licensed MIT. It adds 91 tokens to every session and 4,185 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
401-cloudflare-workers compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| 401-cloudflare-workersd-padmanabhan/agent-engineering-handbook | Cursor rule | 20 | today | MIT | A | 91 | Cursor |
| vue-typescript-patternssoaring-xiongkulu/easyaiot | Cursor rule | 757 | yesterday | MIT | A | 381 | Cursor |
| nextjs-typescript-app-cursorrules-prompt-filePatrickJS/awesome-cursorrules | Cursor rule | 41k | 5mo ago | CC0-1.0 | A | 66 | Cursor |
| tsun-pany/v3-admin-vite | Cursor rule | 7.1k | 4mo ago | MIT | A | 287 | Cursor |
| typescript-securityfmflurry/settings-opencode | Cursor rule | 170 | 6d ago | MIT | A | 0 | Cursor |
| naming-conventions-ruleholtwood/awesome-cursorrules-zh | Cursor rule | 241 | 23d ago | MIT | A | 64 | Cursor |
| platform-pattern-2-filesystem-operationsPaulJPhilp/EffectPatterns | Cursor rule | 807 | 4mo ago | MIT | A | 885 | Cursor |