durable-objects

Develop stateful Cloudflare Durable Objects with RPC methods and SQLite storage.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/achmf/KostaHub --skill durable-objects-achmf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: durable-objects
Source: https://github.com/achmf/KostaHub/tree/main/.agents/skills/durable-objects
Command: npx skills add https://github.com/achmf/KostaHub --skill durable-objects-achmf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of managing stateful coordination on the edge, such as real-time multiplayer games, chat rooms, and collaborative tools, by providing a structured approach to Cloudflare Durable Objects.

Core Features & Use Cases

  • Stateful Coordination: Manage per-entity state with strong consistency for chat rooms, game sessions, or multi-tenant SaaS data.
  • SQLite Storage: Implement persistent, transactional storage directly within the edge object using synchronous SQL.
  • Real-time Communication: Handle persistent WebSocket connections and scheduled background tasks via alarms.

Quick Start

Use the durable-objects skill to generate a new Durable Object class template with SQLite storage and a basic RPC method for state updates.

Frequently Asked Questions about durable-objects

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

FAQPage Schema
How do I manage stateful coordination for real-time applications in Cloudflare Workers?

Stateful coordination in Cloudflare Workers is managed using Durable Objects to maintain per-entity state with strong consistency. This approach supports real-time multiplayer games and chat rooms by handling WebSocket connections and RPC methods directly on the edge.

How do I implement SQLite schema migrations within a Durable Object?

SQLite schema migrations within a Durable Object are implemented using synchronous SQL for persistent, transactional storage directly inside the edge object. This ensures structured data management for multi-tenant SaaS applications and collaborative tools.

Can I use WebSocket connections and scheduled background tasks together on the edge?

WebSocket connections and scheduled background tasks can be used together on the edge via Durable Object alarms. This combination enables persistent real-time communication and automated state updates without external scheduling dependencies.

What is the best way to structure concurrency and sharding for edge computing state?

The best way to structure edge computing state concurrency and sharding is by adhering to Durable Objects best practices within the Workers runtime. This involves managing per-entity state and testing coordination to ensure reliable scaling.

Does the Durable Objects approach support transactional storage for multi-tenant SaaS data?

The Durable Objects approach supports transactional storage for multi-tenant SaaS data by utilizing synchronous SQL directly within the edge object. This provides strong consistency and persistent state management for isolated tenant environments.