cyberneticlibrary

Review Cloudflare Workers code

workers-best-practicesskillsetup L20
Sheshiyer/skill-clusters
What it does

Build serverless APIs and background jobs on Cloudflare Workers

Best for

Lightweight serverless APIs and background jobs with zero cold starts and global edge deployment

Inputs
  • · API route definition
  • · KV binding for state
  • · optional: cron trigger for background jobs
  • · optional: Durable Objects for long-lived state
Outputs
  • · Worker script (TypeScript/JavaScript)
  • · wrangler.toml config
  • · KV/Durable Object bindings
Requires
  • · Cloudflare Workers
  • · wrangler CLI
  • · KV (key-value store)
  • · Durable Objects
  • · D1 (SQLite)
Preconditions

Cloudflare account; wrangler CLI installed; project initialized

Failure modes

Request timeout (10s limit); KV consistency delays; Durable Object cost overruns on high request volume

Trust signals
  • · 10s request timeout guideline documented
  • · KV eventual consistency noted
  • · Durable Objects + KV trade-off guidance