SKILL PROCEDURE

Cloudflare

Use when building on the Cloudflare developer platform — Workers, Pages, D1, R2, KV, Durable Objects, Queues, Vectorize, Workers AI — choosing a storage primitive, configuring bindings and Wrangler, or working around Workers runtime constraints that differ from Node.js. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.

cloudflareworkersedgeserverlessstorage
BEGINNER GUIDE

Understand Cloudflare before using it

WHAT IT COVERS

Use when building on the Cloudflare developer platform — Workers, Pages, D1, R2, KV, Durable Objects, Queues, Vectorize, Workers AI — choosing a storage primitive, configuring bindings and Wrangler, or working around Workers runtime constraints that differ from Node.js. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.

START HERE WHEN

Your work repeatedly involves one or more of these concepts. Open the full procedure below when the current task matches them.

cloudflareworkersedgeserverlessstorage

Compare related skills

SKILLCATEGORYSHARED CONCEPTSEXPLANATION
CloudflareInfrastructureCurrent skillUse when building on the Cloudflare developer platform — Workers, Pages, D1, R2, KV, Durable Objects, Queues, Vectorize, Workers AI — choosing a storage primitive, configuring bindings and Wrangler, or working around Workers runtime constraints that differ from Node.js. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
AppwriteBackend and data
storageserverless
Appwrite — an open-source backend-as-a-service (self-hosted or Cloud) providing Auth, Databases, Storage, Functions, Messaging, and Realtime. Use when adding user authentication and sessions, modelling data in the document database with attributes/permissions, uploading and serving files, running serverless Functions (Node, Python, Ruby, PHP, Dart) triggered by events or schedules, sending push/email/SMS, subscribing to realtime document changes, or integrating the Web/Flutter/Apple/Android/React Native SDKs and server SDKs. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
NeonBackend and data
serverless
Neon — serverless Postgres with database branching, scale-to-zero, and a connection pooler. Use when provisioning Postgres, modelling data for an autoscaling database, using copy-on-write branches for dev/preview/migrations, sizing the autoscaler, choosing connection options (pooled vs direct, the -pooler endpoint), running the CLI, calling the API, configuring extensions, or integrating Neon with frameworks and edge platforms. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
TursoBackend and data
edge
Use when building on Turso, a SQLite-derived database platform built on libSQL — choosing between embedded replicas, Turso Sync, and a direct remote connection, designing a database-per-tenant architecture, adding vector search to a SQLite-shaped schema, or deciding whether to self-host the libSQL server instead of using Turso Cloud. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.

Cloudflare

What is HardGraph? HardGraph publishes curated, provenance-backed agent skills grounded in reproducible vendor documentation.

Cloudflare's developer platform runs your code in V8 isolates distributed across its network, with storage primitives attached as bindings rather than connection strings.

Two things about that sentence cause most of the friction, and neither is obvious from the product pages.

The runtime is not Node.js

Workers run in an isolate, not a container. The consequences are structural, not incidental:

  • There is no persistent filesystem, no long-lived process, and no listening socket. A Worker is invoked per request and may be evicted between them.
  • Node built-ins are available only through explicit compatibility, and the supported surface is a subset. A library that reaches for fs, native addons, or a raw TCP client will not run unchanged.
  • CPU time per invocation is bounded. Work that is slow because it is waiting is fine; work that is slow because it is computing is not.
  • Module-scope state survives only as long as the isolate does. It is a cache, never a store — treating it as a store produces bugs that appear only under low traffic, when isolates are recycled between requests.

If a design assumes a server that stays up, it needs rethinking before it needs porting.

Choosing a storage primitive

They are not interchangeable, and picking by familiarity is the common mistake.

| Need | Use | | --- | --- | | Relational queries, SQL | D1 | | Large blobs, files, media | R2 | | Small values read very often, edge-cached | KV | | Strong consistency for one entity, coordination | Durable Objects | | Decoupling and retries between Workers | Queues | | Similarity search over embeddings | Vectorize | | Pooled connections to an existing external database | Hyperdrive |

The distinction that matters most: KV is eventually consistent and optimised for read-heavy caching; Durable Objects give you a single authoritative instance per key with real consistency. Reaching for KV where you needed a Durable Object produces a system that works in testing and corrupts state under concurrency.

What to verify rather than recall

Cloudflare ships continuously and the platform surface moves faster than most.

  • Compatibility flags and compatibility_date. Behaviour is pinned to a date; the same code on two dates can differ.
  • Binding syntax in Wrangler configuration, and which config format is current.
  • Limits — CPU time, request size, storage quotas, subrequest counts. These change, and they differ by plan.
  • Node compatibility surface, which grows release to release.

Check these against the mirrored corpus under references/vendor/ rather than asserting a value.

References

Hardgraph / curated knowledge for agents.

STATIC EXPORT · CANONICAL SOURCE