cloudflare-durable-objects

Configure Cloudflare Durable Objects with bindings, migrations, and WebSocket hibernation.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-durable-objects-jackspace
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: cloudflare-durable-objects
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/cloudflare-durable-objects
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-durable-objects-jackspace

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill requires wrangler, and includes references (resource) and scripts (resource) components.

What problem does it solve?

Cloudflare Durable Objects provide globally unique, stateful objects for real-time coordination, per-user or per-room state, and hibernation-friendly WebSocket support.

Core Features & Use Cases

  • βœ… Durable Object class structure and bindings
  • βœ… WebSocket hibernation and storage options (SQL/KV)
  • βœ… Alarms for scheduling, migrations, and coordination patterns
  • βœ… RPC-style methods, stable routing, and robust error prevention
  • βœ… Comprehensive references and templates to accelerate adoption

Quick Start

Scaffold a DO project with a DO class, binding, and migration, then deploy and test.

Frequently Asked Questions about cloudflare-durable-objects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build real-time coordination with Durable Objects on Cloudflare?β–Ό

Durable Objects provide globally unique, stateful coordination for real-time applications. Export a DO class, configure wrangler bindings, deploy migrations, and use RPC-style methods to manage per-object state across distributed Workers. Supports WebSocket hibernation, SQL/KV storage, and alarms for scheduling and state synchronization.

Can I use Durable Objects for WebSocket applications with hibernation?β–Ό

Yes. Durable Objects enable WebSocket hibernation to reduce memory overhead. Store connection state in SQL or KV, configure hibernation in wrangler, and use alarm-based resumption patterns. This is ideal for chat rooms, multiplayer servers, and long-lived connections requiring per-client or per-room state.

What's the best way to handle migrations and alarms in Durable Objects?β–Ό

Configure migrations in wrangler to version your DO schema safely. Use alarms for scheduled tasks, rate limiting, and state coordination. Define alarm handlers within your DO class, schedule them with stable routing, and combine with RPC methods to prevent common configuration errors and maintain consistency.

Do I need SQL or KV storage alongside Durable Objects?β–Ό

Durable Objects support both SQL and KV storage for persistence. Choose SQL for structured queries and relational data; use KV for simple key-value pairs. Combine with DO in-memory state for fast, low-latency coordination while offloading durability to your preferred backend.

How do I prevent common misconfigurations when deploying Durable Objects?β–Ό

Ensure DO classes are exported correctly, bindings are wired in wrangler.toml, migrations are idempotent, and WebSocket hibernation is enabled if needed. Use stable routing for RPC calls, handle alarms with proper error handling, and test migrations before production deployment.

What use cases benefit most from Durable Objects?β–Ό

Durable Objects excel at per-user sessions, chat rooms, multiplayer game servers, rate limiting, and session management. They solve stateful coordination problems where you need unique, persistent object identity, fast RPC-style communication, and optional WebSocket support with hibernation.