durable-objects

Build, test, and manage Cloudflare Durable Objects for stateful edge apps.

3|Updated Jul 5, 2021
One-click install
npx skills add https://github.com/iAziz786/dotfiles --skill durable-objects-iaziz786
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: durable-objects
Source: https://github.com/iAziz786/dotfiles/tree/main/.agents/skills/durable-objects
Command: npx skills add https://github.com/iAziz786/dotfiles --skill durable-objects-iaziz786

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Durable Objects enable stateful coordination at the edge; this Skill guides building, reviewing, and configuring DO-based systems, including RPC methods, storage, alarms, and WebSocket handling, with a bias toward Cloudflare docs for accuracy.

Core Features & Use Cases

  • Guidance on creating DO classes for per-entity coordination (chat rooms, games, per-user state)
  • Instructions for wrangler config, migrations, testing with Vitest, and best practices for storage via SQLite
  • Real-world scenarios: chat rooms, multiplayer games, booking systems, real-time collaboration, and per-tenant data management

Quick Start

Start by scaffolding a simple Durable Object, wiring deterministic routing with getByName, and running tests to verify instance isolation and storage persistence.

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 edge applications with Cloudflare Durable Objects?

Cloudflare Durable Objects enable stateful edge coordination by creating per-entity classes for scenarios like chat rooms or game sessions, utilizing deterministic routing via getByName, and managing state with SQLite storage, alarms, and WebSocket handling.

What is the best way to test Cloudflare Durable Objects and verify instance isolation?

Testing Cloudflare Durable Objects with Vitest verifies instance isolation and storage persistence by running tests against your DO classes, ensuring deterministic routing and robust initialization patterns function correctly across per-entity coordination atoms.

How do I configure wrangler for Cloudflare Durable Objects and manage migrations?

Configuring wrangler for Cloudflare Durable Objects involves setting up migrations and defining bindings in your wrangler configuration file to properly route stateful edge applications using deterministic getByName routing.

Can I use Cloudflare Durable Objects for real-time collaboration and per-tenant data management?

Cloudflare Durable Objects support real-time collaboration, booking systems, and per-tenant data management by enforcing one DO per coordination atom, enabling reliable per-user state and WebSocket connections at the edge.

When should I not use Cloudflare Durable Objects for stateful coordination?

Avoid Cloudflare Durable Objects when your stateful coordination requirements do not align with one DO per coordination atom, or when deterministic routing via getByName and per-entity isolation are unnecessary for your application architecture.