durable-objects

Create and review Cloudflare Durable Objects for stateful edge coordination.

29|1|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/bohdanbirdie/cloudstash --skill durable-objects-bohdanbirdie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: durable-objects
Source: https://github.com/bohdanbirdie/cloudstash/tree/main/.agents/skills/durable-objects
Command: npx skills add https://github.com/bohdanbirdie/cloudstash --skill durable-objects-bohdanbirdie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Durable Objects enable stateful coordination at the edge, providing per-entity storage, strong consistency, and predictable routing for real-time apps and collaborative workflows.

Core Features & Use Cases

  • Stateful coordination at the edge with per-entity storage (SQLite-backed) for chat rooms, games, or collaborative documents
  • RPC methods and WebSocket support for low-latency, bidirectional communication
  • Wrangler integration, migrations, and Vitest-compatible testing patterns to ship reliably
  • Observability, alarms, and lifecycle management for scheduled tasks and clean shutdowns

Quick Start

Install Wrangler, bootstrap a Durable Objects project, and start implementing and testing a DO class.

Frequently Asked Questions about durable-objects

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

FAQPage Schema
How do I build stateful coordination for WebSocket chat rooms on Cloudflare Workers?

Cloudflare Durable Objects provide per-entity storage and strong consistency for stateful coordination at the edge. You can build WebSocket chat rooms by implementing a DO class to manage bidirectional communication and state updates.

What is the best way to test Cloudflare Durable Objects using Vitest?

Vitest-compatible testing patterns for Durable Objects allow you to validate class design, state management, and RPC methods reliably. You can run tests locally via Wrangler to ensure your DO behaves correctly before deployment.

Does Cloudflare Durable Objects support SQLite for per-entity storage?

Yes, Durable Objects support SQLite-backed per-entity storage for applications like collaborative documents and games. This provides strong consistency and predictable routing for real-time state management at the edge.

How do I configure Wrangler and migrations for a Durable Objects project?

You can configure Durable Objects by setting up Wrangler integration and defining migrations for your project. This involves bootstrapping the DO class, specifying environment setup, and applying best-practice usage of getByName routing.

Can I use Durable Objects for scheduled tasks and alarms?

Yes, Durable Objects include built-in support for alarms and lifecycle management. This allows you to handle scheduled tasks, execute timed operations, and ensure clean shutdowns for your stateful edge applications.

When should I use Durable Objects instead of standard stateless Workers?

Use Durable Objects when you need stateful coordination, per-entity storage, and strong consistency for real-time apps like multiplayer sessions or RPC services. Standard Workers are better suited for stateless request handling without persistent storage requirements.