Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Deploys and manages Cloudflare Durable Objects as stateful per-key actors with in-memory and transactional storage state.
Use this skill ↓23% 55%+32 ptsof test cases passed
Passed 12 of 22 test cases with the skill, and 5 of 22 without it.
Show the tool call to delete the Durable Object class named 'temp-cache' in 'app_clean_99', and summarize what happens to existing instance storage.
Calls manage_durable_objects with action 'delete' for name 'temp-cache'
3 of 3 safety checks passed
Durable Objects (DOs) are stateful per-key actors running on Cloudflare Workers. Each instance has its own in-memory state and a built-in transactional KV store. Use one when state must survive across requests for a single room/user/agent. For stateless work, use a serverless function instead (butterbase-skills:function-dev).
One tool: manage_durable_objects.
Class: ChatRoom (deployed once)
│
├── instance "lobby" ─► in-memory state + state.storage + WebSockets
├── instance "general" ─► separate state, separate sockets
└── instance "user-123" ─► separate again
Each URL https://<app>.butterbase.dev/_do/chat-room/<instance-id>
gets routed to the instance with that id. State is isolated per id.
A class is shared code; an instance is a unique key (/lobby, /general, /user-123). Different ids = different state. There is no shared cross-instance state.
import { ... } from 'cloudflare:workers' is allowed.export class Foo { ... } — no extra exports, no helpers re-exported.ChatRoom ↔ chat-room).state.storage keys/values capped at 128 KB. Larger blobs → Butterbase Storage.access_mode: "public". Browsers can't set custom headers on WS upgrade, and the _do/ dispatcher reads auth only from Authorization — ?token= and Sec-WebSocket-Protocol are silently ignored at the dispatcher (unlike the /realtime route, which does accept ?token=). Set the DO public, then read the token from ?token= (or Sec-WebSocket-Protocol) inside fetch() and verify it yourself before accepting the upgrade. Server-to-server callers can still use authenticated/service_key.Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.