测试与安全

durable-objects

cloudflare/skills

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

  • 11.4万 次安装
  • 3200 星标
  • 收录于

安装命令

npx skills add https://github.com/cloudflare/skills --skill durable-objects

要点

Build stateful, coordinated applications on Cloudflare's edge with persistent storage and RPC methods.

  • Designed for coordination patterns: chat rooms, multiplayer games, booking systems, and per-entity state management using deterministic routing via getByName()
  • Includes SQLite storage with synchronous sql.exec(), KV storage, alarms for scheduled per-entity work, and WebSocket support
  • Provides RPC method calls (preferred over fetch handlers), blockConcurrencyWhile() for initialization, and parent-child DO relationships for sharding
  • Covers wrangler configuration, migrations, Workers integration, and testing with Vitest; biases toward live Cloudflare docs over pre-trained knowledge

SKILL.md

Durable Objects

Build stateful, coordinated applications on Cloudflare's edge using Durable Objects.

Retrieval Sources

Your knowledge of Durable Objects APIs and configuration may be outdated. Prefer retrieval over pre-training for any Durable Objects task.

Resource URL
Docs https://developers.cloudflare.com/durable-objects/index.md
API Reference https://developers.cloudflare.com/durable-objects/api/index.md
Best Practices https://developers.cloudflare.com/durable-objects/best-practices/index.md
Examples https://developers.cloudflare.com/durable-objects/examples/index.md
Roles and permissions https://developers.cloudflare.com/workers/authorization/durable-objects/index.md

Fetch the relevant doc page when implementing features.

When to Use