What problem does it solve? Testing Cloudflare Workers code that depends on KV, D1, R2, queues, or Durable Objects normally requires a wrangler runtime, making fast unit tests difficult. This Skill provides in-memory, behavior-accurate binding mocks where storage bindings really store and SQL bindings run real SQL through the runtime's SQLite, so malformed statements and constraint violations fail in the test rather than in production. ## Core Features & Use Cases - Binding factories: createKVNamespace, createD1Database, createSqlStorage, createR2Bucket, createQueue, createDurableObjectState, createExecutionContext, and createEnv, each typed against @cloudflare/workers-types so drift from the platform fails typecheck. - Real SQL execution: D1 and SqlStorage run actual SQL via the runtime's built-in SQLite (Bun or Node), letting you cover a repository's generated SQL with ordinary unit tests. - Deterministic async control: queues hold messages until consume() is called, alarms fire only when the test invokes alarm(), and createExecutionContext().settled() awaits waitUntil background work. - Use Case: Unit-test a Worker fetch handler that reads KV and writes to D1 by calling createEnv({ DB: createD1Database(), CACHE: createKVNamespace() }) in beforeEach, then asserting on stored rows without starting wrangler. ## Quick Start Add @sdxc/cloudflare-mocks as a workspace dev dependency and ask the AI to write a unit test for your Worker handler using createEnv with the bindings your code expects.