durable-objects
Skill by cloudflare
Builds, debugs, and reviews Cloudflare Durable Objects code for persistent state and coordination. Aimed at developers who write stateful applications on Cloudflare Workers.
Install durable-objects
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/durable-objects ~/.claude/skills/durable-objectsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/durable-objects ~/.gemini/antigravity-cli/skills/durable-objectsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The durable-objects skill guides an AI assistant through building, debugging, and reviewing Cloudflare Durable Objects code. It covers persistent state and coordination, including RPC methods, alarms, WebSocket handlers, and SQL or key-value storage. The skill tells the assistant to fetch current Cloudflare documentation before implementing features, because its built-in knowledge of the APIs may be outdated.
The skill also covers Wrangler configuration for Durable Object bindings and migrations, stub creation with getByName and idFromName, and testing with Cloudflare's Vitest integration. It lists critical rules such as modeling objects around coordination units, using SQLite storage, and persisting state before updating in-memory state. It is intended for developers creating or reviewing stateful applications on Cloudflare's edge.
Written from the project's SKILL.md and checked against it.
What it can do
- Build Durable Object classesCreates new Durable Object classes for stateful coordination.
- RPC methods, alarms and WebSocketsImplements RPC methods, alarm handlers and WebSocket handlers.
- Review existing DO codeReviews Durable Objects code against best practices.
- Wrangler configurationConfigures wrangler.jsonc or toml for bindings and migrations.
- Storage operationsUses SQL storage through sql.exec and key-value storage through put and get.
- Stub creationRoutes requests with getByName, idFromString or newUniqueId.
- Vitest testingGuides writing Durable Object tests with Cloudflare's Vitest integration.
- Sharding designDesigns sharding strategies and parent-child relationships between objects.
What you need
- Cloudflare Workers project
- Wrangler configuration (wrangler.jsonc or toml)
Try asking
- Create a Durable Object for a chat room with SQLite storage and RPC methods.
- Review my Durable Objects code for best practice issues and concurrency risks.
- Set up Vitest tests for my Durable Object with the Cloudflare integration.
Good to know
- Not suited to stateless request handling.
- Not suited to maximum global distribution or high fan-out independent requests.
- The skill asks the assistant to check current docs, since its own API knowledge may be outdated.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/durable-objects/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB -
references/rules.md3 KB -
references/skill-feedback.md3 KB -
references/testing.md2 KB -
references/workers.md8 KB
Alternatives to durable-objects
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
durable-objects: common questions
When should I use Durable Objects?
The skill recommends Durable Objects for coordination such as chat rooms and multiplayer games, strong consistency, per-entity storage, persistent connections, and scheduled work per entity.
Does the skill support SQLite storage?
Yes. It recommends SQLite storage configured through new_sqlite_classes in migrations, and shows sql.exec for queries.
Can it help me test Durable Objects?
Yes. The skill points to a testing reference for current Vitest setup, APIs, and examples for Durable Object tests.
How do I install durable-objects?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is durable-objects free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is durable-objects safe to use?
It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to durable-objects?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
