Skills

Durable Objects

Build, debug, or review Cloudflare Durable Objects code for persistent state and...

Install

npx skills add cloudflare/skills --skill durable-objects -g -a claude-code -y
Repository
cloudflare/skills3.2k
Category
Testing
Updated
4d ago
License
Apache-2.0
Context cost
Mediumabout 1,530 tokens
Runs scripts
No, instructions only

What it does

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

Durable Objects

Build stateful, coordinated applications on Cloudflare's edge using Durable Objects.

Retrieval Sources

Your knowledge of Durable Objects APIs and configuration may be outdated. Prefer retrieval over pre-training for any Durable Objects task.

ResourceURL
Docshttps://developers.cloudflare.com/durable-objects/index.md
API Referencehttps://developers.cloudflare.com/durable-objects/api/index.md
Best Practiceshttps://developers.cloudflare.com/durable-objects/best-practices/index.md
Exampleshttps://developers.cloudflare.com/durable-objects/examples/index.md
Roles and permissionshttps://developers.cloudflare.com/workers/authorization/durable-objects/index.md

Fetch the relevant doc page when implementing features.

When to Use

  • Creating new Durable Object classes for stateful coordination
  • Implementing RPC methods, alarms, or WebSocket handlers
  • Reviewing existing DO code for best practices
  • Configuring wrangler.jsonc/toml for DO bindings and migrations
  • Writing tests with Cloudflare’s Vitest integration
  • Designing sharding strategies and parent-child relationships

Reference Documentation

  • ./references/rules.md - Core rules, storage, concurrency, RPC, alarms
  • Testing reference - Current Vitest documentation, migration choices, and test selection
  • Workers reference - Workers handlers, types, configuration, tracing, and local debugging

Search: blockConcurrencyWhile, idFromName, getByName, setAlarm, sql.exec

Core Principles

Use Durable Objects For

Read the whole SKILL.md on GitHub

More in Testing