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/louisbrulenaudet/monorepo-templateWrote 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/louisbrulenaudet/monorepo-template/workers-config)<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/workers-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/workers-config/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/louisbrulenaudet/monorepo-template/workers-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/workers-config.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.02712 | $0.02712 |
| Opus 5.5 | $0.01085 | $0.01085 |
| Sonnet 5.5 | $0.00542 | $0.00542 |
| Haiku 4.5 | $0.00271 | $0.00271 |
Grade A, and why
workers-config scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worker Config (cloudflare.config.ts)
cloudflare.config.ts is the source of truth for each app's Worker name, bindings, vars, and exports in every mode; cf, the Cloudflare Vite plugin, and @cloudflare/vitest-plugin all evaluate it. Build and dev settings (minify, source maps, dev port, inspector port) live in the app's vite.config.ts, never here. RPC bindings: service-bindings.mdc; cache: workers-cache.mdc.
Shape
export default defineConfig({ worker: (ctx) => … })fromcf/config: the factory picks one entry from aDEPLOYMENTStable keyeddevelopment/staging/productionand returns a single object built from it. Scaffold a new app by copying an existing app'scloudflare.config.ts+vite.config.tsand editing them by hand.- Modes fail closed: an unknown
ctx.modethrows instead of falling back to development values, andctx.isPreviewthrows unless the mode isproduction. Never add a default branch. Missing required config fails predictably, never degrades - the application-level 503 guards (CORS_ORIGINS) stay too. - One env shape, one return.
Envis inferred (InferEnvover the default export) and the generated types declareinterface Env extends __Env; an interface cannot extend a union, so branches returning differently shaped objects break type generation. Keep every mode on the sameenvkeys, per-mode values in theDeploymenttable (a field may be a union such asSecretBinding | TextBinding<"">), and onereturn. - Every
@repo/*import is type-only (import type { AppEnvironment } from "@repo/enums-common"); modes use string literals typed by the enum (environment: "dev"), which tsc checks. The Vite plugin adds every module the config loads toserver.fs.deny, so a value import denies that package to the Worker and SPA that also import it (cf dev:Failed to load url /@fs/…/packages/enums-common/src/index.ts … Does the file exist?), and Node loads the config natively without adding extensions, so a value import from an extensionless@repo/*package fails at load. - Names: development keeps the bare package name (
worker-api,front-app); deployed Workers are<app>-stagingand<app>-production, and Previews live under<app>-production. CD, the Preview scripts,wrangler tail, and Worker-name bindings address these names - never rename them in passing. compatibilityDate2026-08-04 or later, so Node.js compatibility is on by default; never addnodejs_compat/nodejs_compat_v2tocompatibilityFlags.- A Worker with code sets
entrypointfromimport * as entrypoint from "./src/index.ts" with { type: "cf-worker" }(the shared presets setallowImportingTsExtensions). The assets-onlyfront-apphas noentrypointand setsassets: { notFoundHandling: "single-page-application" }. previewUrls: truein production only - Previews need it. It is applied bycf workers triggers deploy(or a fullcf deploy), never bycf workers versions create/cf workers deployments create, which is all CD runs; it also exposes production Version URLs, and Preview URLs stay public until Cloudflare Access guards thefront-appones (never the gateway's) (../ops/previews.mdc).workersDevdefaults totrue; setfalseonly once custom domains serve the Worker.- Observability per deployment: development samples logs and traces at 1; staging and production trace at
headSamplingRate: 0.01; theworker-apiPreview persists logs and traces at 1, thefront-appPreview keeps production's. KeepredactQueryString: trueon every deployed mode: query strings can carry tokens. The Sentry sampler mirrors these (hono-gateway.mdc). - Porting a Wrangler config: env blocks → modes,
previewsblock → thectx.isPreviewbranch,vars→bindings.text(),secrets.required→bindings.secret(),version_metadata→bindings.versionMetadata(),observability/assets/limitskeys → camelCase underworker;minify,upload_source_maps,dev.port,inspector_port→vite.config.ts.
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.
- 1mo ago Changed · +92 tokens per session 471fa1f19c28
- 1mo ago Changed · +30 tokens per session ba5f1ba6ca51
- 1mo ago Changed · +28 tokens per session fc38b814e7e7
- 2mo ago Changed · +1 lines · +113 tokens per session eca1adaf45a9
- 2mo ago Changed · -26 lines · +413 tokens per session 95c574e452bb
- 2mo ago Changed · +1 lines · +190 tokens per session 330b2519679a
- 2mo ago Changed · +2 lines · +152 tokens per session 026623c1e0ad
- 3mo ago First seen · 89 lines · 1,694 tokens per session scan A f70eeb805f01
workers-config is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 8d ago), licensed Apache-2.0. It adds 2,712 tokens to every session, about $0.0108 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
workers-config compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| workers-configlouisbrulenaudet/monorepo-template | Cursor rule | 19 | 8d ago | Apache-2.0 | A | 2,712 | Cursor |
| cloudflare-workers-autousrrname/cursorrules | Cursor rule | 11 | 7mo ago | ISC | A | 0 | Cursor |
| cloudflare-workers-hono-autousrrname/cursorrules | Cursor rule | 11 | 7mo ago | ISC | A | 0 | Cursor |
| ankra-cliPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 1,574 | Cursor |
| paperfitOpenRaiser/PaperFit | Cursor rule | 337 | 26d ago | MIT | A | 0 | Cursor |
| swift-argument-parsersteipete/agent-rules | Cursor rule | 5.7k | 7mo ago | MIT | A | 0 | Cursor |
| release-version-bump-autousrrname/cursorrules | Cursor rule | 11 | 7mo ago | ISC | A | 67 | Cursor |