durable-objects

Create and review Cloudflare Durable Objects with RPC, SQLite, alarms, and WebSockets.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/mynameistito/opencode-config --skill durable-objects-mynameistito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: durable-objects
Source: https://github.com/mynameistito/opencode-config/tree/main/skills/durable-objects
Command: npx skills add https://github.com/mynameistito/opencode-config --skill durable-objects-mynameistito

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the friction of building and maintaining stateful, coordinated applications on Cloudflare's edge, eliminating guesswork around Durable Objects configuration, best practices, and testing.

Core Features & Use Cases

  • Stateful Coordination: Build apps like real-time chat rooms, multiplayer games, and booking systems that require consistent per-entity state and strong consistency.
  • Full Lifecycle Support: Covers RPC method implementation, SQLite storage setup, alarm scheduling, WebSocket handlers, and wrangler configuration for Durable Objects.
  • Code Review & Testing: Includes guardrails for reviewing existing DO code for anti-patterns and guidance for writing unit and integration tests with Vitest in the Workers runtime.

Quick Start

Use the durable-objects skill to build a stateful chat room Durable Object with persistent message storage and RPC methods for sending and retrieving messages.

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

Build stateful Cloudflare Workers by creating Durable Objects that handle per-entity strong consistency for coordinated edge applications like real-time chat and multiplayer games. This Skill provides full lifecycle support including RPC methods and WebSocket handlers.

How do I configure SQLite storage and alarms in Cloudflare Durable Objects?

Configure SQLite storage and alarms in Cloudflare Durable Objects by setting up storage configuration and scheduling alarms within your object class. This Skill covers SQLite storage setup, alarm scheduling, and RPC method implementation for persistent state.

Can I test Cloudflare Durable Objects using Vitest?

Yes, you can test Cloudflare Durable Objects using Vitest in the Workers runtime. This Skill provides guardrails for reviewing existing code for anti-patterns and guidance for writing unit and integration tests with Vitest.

When do I need Durable Objects for my Cloudflare edge app?

You need Durable Objects for workloads requiring per-entity strong consistency and persistent connections, such as booking systems, real-time chat rooms, or multiplayer games. They coordinate stateful logic directly at Cloudflare's edge.

What's the best way to handle WebSocket connections in Cloudflare Durable Objects?

The best way to handle WebSocket connections in Cloudflare Durable Objects is implementing WebSocket handlers within your object class to maintain persistent connections. This Skill guides RPC method implementation and wrangler configuration for this setup.

How do I set up wrangler configuration for a stateful Cloudflare Worker?

Set up wrangler configuration for a stateful Cloudflare Worker by defining your Durable Objects bindings and migrations in wrangler.toml. This Skill provides the necessary wrangler setup to deploy coordinated edge applications with SQLite storage.