durable-objects

Create and review Cloudflare Durable Objects with wrangler and Vitest.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/HsnSaboor/open-engineer --skill durable-objects-hsnsaboor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: durable-objects
Source: https://github.com/HsnSaboor/open-engineer/tree/main/src/skills/bundled/durable-objects
Command: npx skills add https://github.com/HsnSaboor/open-engineer --skill durable-objects-hsnsaboor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables developers to build and review robust, stateful applications on Cloudflare's edge network using Durable Objects, simplifying complex coordination and data persistence.

Core Features & Use Cases

  • Durable Object Creation: Design and implement new Durable Object classes for stateful coordination.
  • RPC & WebSockets: Implement real-time features like RPC methods, alarms, and WebSocket handlers.
  • Testing & Configuration: Configure wrangler.jsonc and write tests using Vitest.
  • Use Case: Build a real-time chat application where each chat room is managed by a Durable Object, ensuring persistent connections and state synchronization.

Quick Start

Create a new Durable Object class named 'Counter' that increments a value stored in its state.

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 applications on Cloudflare's edge network?

To build stateful edge applications on Cloudflare, you can use Durable Objects for stateful coordination, implementing RPC methods, alarms, and WebSocket handlers to manage persistent connections and data synchronization.

How do I manage real-time WebSocket connections in a Cloudflare Durable Object?

Managing real-time WebSockets in a Cloudflare Durable Object involves implementing WebSocket handlers within the DO class to maintain persistent connections and ensure state synchronization across edge clients.

Can I test Cloudflare Durable Objects using Vitest?

Yes, you can test Cloudflare Durable Objects using Vitest by configuring your wrangler.jsonc file and writing tests that validate the stateful coordination, RPC methods, and alarm logic of your DO classes.

When should I use Cloudflare Durable Objects for edge computing?

You should use Cloudflare Durable Objects for edge computing when you need robust stateful coordination, such as building real-time chat applications where each room requires a persistent state and synchronized connections.

What are the best practices for storage and concurrency management in Durable Objects?

Best practices for Durable Objects storage and concurrency management involve properly configuring state synchronization, utilizing alarms for scheduled tasks, and applying RPC methods to ensure robust data persistence without conflicts.

How do I configure wrangler.jsonc for a Cloudflare Durable Object project?

Configuring wrangler.jsonc for a Cloudflare Durable Object project requires defining the DO bindings and class locations to enable stateful edge computing, RPC interactions, and Vitest testing integration.