Durable Objects (Cloudflare): a Claude skill for stateful Workers code
Cloudflare's durable-objects skill helps Claude build, debug and review Durable Objects code for state and coordination.
- Installs
- 116.6K
- on skills.sh
- Stars
- 3.2K
- on GitHub
- Files
- 4
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
durable-objects is Cloudflare's skill for stateful apps on Workers. It gives Claude a set of rules for Durable Objects: one object per coordination unit, getByName() for routing, SQLite storage, RPC methods, and persist-before-cache. It lists five anti-patterns, such as one global object for all requests.
It loads when you create Durable Object classes, write RPC, alarm or WebSocket handlers, configure wrangler bindings and migrations, or write tests. SKILL.md tells Claude to fetch current Cloudflare docs instead of relying on memory. It bundles four reference files and no scripts.
Good for
- Developers building chat rooms, games or collaborative apps on Workers
- Teams needing strongly consistent per-user or per-entity state
- Reviewers checking Durable Object code, migrations and tests
Install durable-objects
Claude Code
- 1
Copy this prompt.
Install the durable-objects skill in Claude Code. Run this command: npx skills add https://github.com/cloudflare/skills --skill durable-objects Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
Sections in SKILL.md
- Retrieval Sources
- When to Use
- Reference Documentation
- Core Principles
- Use Durable Objects For
- Do NOT Use For
- Quick Reference
- Wrangler Configuration
- Basic Durable Object Pattern
- Critical Rules
- Authorization
- Anti-Patterns (NEVER)
- Stub Creation
- Storage Operations
- Alarms
- Testing
Key facts
- Author
- Cloudflare
- Skill folder
- skills/durable-objects
- skills.sh installs
- 116,585
- Repo stars
- 3,244
- License
- Apache-2.0
- Last repo commit
- 2026-10-31
- Bundled files
- 4 files besides SKILL.md: references/rules.md, references/skill-feedback.md, references/testing.md, references/workers.md
- skills.sh audits
- Gen Agent Trust Hub: pass; Socket: pass; Snyk: pass
What it includes
Five Cloudflare doc pages Claude fetches for current API details
Network ·
Retrieval sourcesCoordination, strong consistency, per-entity storage, live connections, scheduled work
When to use Durable Objects7 rules, from one object per chat room or game to one alarm per object
Critical rules5 patterns, including a single global object and blockConcurrencyWhile on every request
Anti-patterns (NEVER)getByName(), idFromString() with get(), newUniqueId()
Stub creationSynchronous SQL (recommended) and async key-value
Write ·
Storage operationssetAlarm(), the alarm() handler and deleteAlarm()
Write ·
AlarmsAccess follows the Worker; testing reference covers Cloudflare's Vitest integration
Authorization and testing
From the official docs
Permissions
Low risk
The skill can edit your Worker code and its Durable Object bindings and migrations. Review the diff before you deploy.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It edits bindings and migrations
Changes to wrangler config and migrations apply when you deploy. Read them before running a deploy.
Feedback can become a public GitHub issue
If you report bad guidance, references/skill-feedback.md has Claude draft an issue for cloudflare/skills and post it only after you see and approve the exact title and body. Issues are public.
It reads Cloudflare docs from the web
Claude fetches the doc pages listed in SKILL.md when it needs current API details.
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only switch. Ask for a review only and no edits. |
|---|---|
| Talks to | developers.cloudflare.com (docs fetched by Claude). github.com/cloudflare/skills (only if you approve a feedback issue) |
| Sign-in and keys | No account or key is named in SKILL.md. |
| Scopes |
|
Questions
What does the durable-objects skill do?
It gives Claude Cloudflare's rules for writing, debugging and reviewing Durable Objects, with a starter pattern for configuration, storage, RPC and alarms.
How do I install durable-objects in Claude Code, Claude or Codex?
Use the install box at the top of the page and pick Claude Code, Claude or Codex. Claude Code and Codex read skills from a folder on your machine. In the Claude app you upload the skill folder as a zip.
When should I not use Durable Objects?
SKILL.md says not to use them for stateless request handling, when you need maximum global distribution, or for high fan-out independent requests.
Does it need an API key?
SKILL.md names no key. It tells Claude to fetch Cloudflare docs pages when implementing a feature.
Is it related to the workers-best-practices skill?
Yes. Cloudflare's workers-best-practices skill sends Durable Objects questions to this one. They cover different topics and can be installed together.
Is it safe to use?
It bundles no scripts. It can edit your Wrangler config and migrations, so review diffs before deploying. A bundled feedback file lets Claude post a public GitHub issue, but only after you approve the exact text.
Information
updated Nov 2, 2026
- Repository
- cloudflare/skills
- Folder
skills/durable-objects
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- durable-objects SKILL.md · github.com
- durable-objects on skills.sh · skills.sh
- workers-best-practices SKILL.md · github.com
- durable-objects skill-feedback.md · github.com