durable-objects
Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
Security Assessment
Detected risks:
About durable-objects
The durable-objects skill enables developers to create and manage Cloudflare Durable Objects, which are essential for building stateful applications that require coordination across multiple instances. This skill addresses the challenges of maintaining state in distributed environments, making it ideal for applications such as chat rooms, multiplayer games, and booking systems. By leveraging Durable Objects, developers can ensure strong consistency and persistent connections, which are crucial for real-time interactions and data integrity.
FAQ
What are Durable Objects used for?
Durable Objects are used for creating stateful coordination in applications like chat rooms, multiplayer games, and booking systems.
Can I use Durable Objects for stateless request handling?
No, Durable Objects are not suitable for stateless request handling; plain Workers should be used instead.
What is the recommended way to configure Durable Objects?
Durable Objects should be configured in the wrangler.jsonc file, specifying bindings and migrations.
Are there any limitations when using Durable Objects?
Yes, Durable Objects should not be used for maximum global distribution needs or high fan-out independent requests.
How do I test Durable Objects?
You can write tests for Durable Objects using the @cloudflare/vitest-pool-workers framework.
Install durable-objects
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
cloudflare/skills