cloudflare-durable-objects

Implement Cloudflare Durable Objects with WebSocket hibernation, alarms, and migrations.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill cloudflare-durable-objects-ovachiever
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-durable-objects
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/cloudflare-durable-objects
Command: npx skills add https://github.com/ovachiever/droid-tings --skill cloudflare-durable-objects-ovachiever

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler, @cloudflare/workers-types, typescript, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Master Durable Objects with persistent state, inter-DO communication, alarms, and web socket patterns on Cloudflare.

Core Features & Use Cases

  • Do class scaffolding, bindings, and migrations
  • SQL (SQLite) and KV storage patterns
  • Alarms, RPC, WebSocket, and inter-DO coordination patterns
  • Production-ready templates and references

Quick Start

Scaffold DO classes, configure wrangler, and deploy with migrations.

Frequently Asked Questions about cloudflare-durable-objects

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

FAQPage Schema
How do I implement stateful WebSocket connections with Cloudflare Durable Objects?

Durable Objects enable stateful WebSocket patterns by maintaining persistent state across connections. Use WebSocket hibernation to pause inactive connections and alarms to trigger events, reducing memory overhead while keeping state synchronized across multiple clients in real-time applications like chat rooms and multiplayer games.

What's the best way to structure Durable Objects classes with migrations?

Structure DO classes with proper scaffolding, configure bindings in wrangler, and implement migrations to evolve your data schema safely. Migrations let you transform existing state while maintaining backward compatibility across deployments.

Can I use SQL storage with Cloudflare Durable Objects?

Yes, Durable Objects support SQLite for relational storage alongside KV for key-value data. Choose SQL when you need structured queries and transactions, or KV for simpler state management, depending on your application's data access patterns.

How do I coordinate between multiple Durable Objects using RPC and Fetch?

Durable Objects communicate via RPC for direct method invocation or Fetch for HTTP-style requests. RPC offers lower latency for inter-DO coordination in scenarios like cross-room messaging, while Fetch integrates with standard HTTP patterns for broader compatibility.

When should I use alarms in Durable Objects?

Alarms trigger scheduled logic without external cron jobs—ideal for rate limiting cleanup, session timeouts, and periodic state synchronization. They execute within the DO's context, preserving consistency for time-sensitive operations.

Do Durable Objects work for session management and rate limiting?

Yes, Durable Objects excel at session management by maintaining per-user state and rate limiting by tracking request counts with alarms enforcing reset schedules. Their persistent, low-latency state makes them suitable for these stateful, high-concurrency use cases.