durable-objects

durable-objects is a skill for Claude Code from cloudflare/skills. It costs 22 tokens per session (1,355 once invoked), scanned A, original, Apache-2.0.

Instructions for building and reviewing Cloudflare Durable Objects, which are server-side objects that keep state and coordinate requests at the edge.

In plain words
What is it for?
Use them for stateful features such as chat rooms, multiplayer games, bookings, coordination services, Durable Object migrations, or Vitest tests.
Why use it?
They provide project guidance for storage, concurrency, remote methods, alarms, WebSockets, configuration, and testing, while directing agents to current Cloudflare documentation.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cloudflare plugin — 19 skills, 1 MCP server shipped together

Good fit Use them for stateful features such as chat rooms, multiplayer games, bookings, coordination services, Durable Object migrations, or Vitest tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cloudflare/skills/durable-objects
About the project

Cloudflare Skills is a collection of instructions and tools that help coding agents build on Cloudflare Workers, the Agents SDK, and other Cloudflare developer services. It is for agents and developers using Cloudflare’s platform. The catalogue entries package the project’s guidance as skills, commands, rules, plugins, and MCP tools.

cloudflare/skills · 3,079 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cloudflare/skills --skill durable-objects
Clone the repo
git clone --depth 1 https://github.com/cloudflare/skills

Made for: Claude Code.

Or install cloudflare, the plugin that ships this one along with the rest of its 19 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for durable-objects

README.md
[![agentmods](https://agentmods.dev/badge/skills/cloudflare/skills/durable-objects/github.svg)](https://agentmods.dev/skills/cloudflare/skills/durable-objects)
Your own site
<a href="https://agentmods.dev/skills/cloudflare/skills/durable-objects"><img src="https://agentmods.dev/badge/skills/cloudflare/skills/durable-objects/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for durable-objects

Your own site · 80×15
<a href="https://agentmods.dev/skills/cloudflare/skills/durable-objects"><img src="https://agentmods.dev/badge/skills/cloudflare/skills/durable-objects.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 23 Sept 2026
  • Snyk pass 23 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01355
Opus 5.5 $0.00009 $0.00542
Sonnet 5.5 $0.00004 $0.00271
Haiku 4.5 $0.00002 $0.00136

Measured 15d ago against content hash 2468c1795f43, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

durable-objects scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request, env: Env): Promise<Response> {
Origin

Copies of this mod

6 near-identical copies found in the catalogue:

skills/durable-objects/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Resource URL
Docs https://developers.cloudflare.com/durable-objects/index.md
API Reference https://developers.cloudflare.com/durable-objects/api/index.md
Best Practices https://developers.cloudflare.com/durable-objects/best-practices/index.md
Examples https://developers.cloudflare.com/durable-objects/examples/index.md
Roles and permissions https://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
  • ./references/workers.md - Workers handlers, types, wrangler config, observability

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

Core Principles

Use Durable Objects For

Need Example
Coordination Chat rooms, multiplayer games, collaborative docs
Strong consistency Inventory, booking systems, turn-based games
Per-entity storage Multi-tenant SaaS, per-user data
Persistent connections WebSockets, real-time notifications
Scheduled work per entity Subscription renewals, game timeouts

Do NOT Use For

Read the full file on GitHub · 181 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago Changed 2468c1795f43
  2. 24d ago Changed · +5 lines 2f9d7b37273e
  3. 1mo ago Changed · -11 lines · -54 tokens per session bd2ef83fd539
  4. 1mo ago First seen · 187 lines · 76 tokens per session scan A cd6797cb18f3

Subscribe to this mod's changes

durable-objects is a skill published in the GitHub repository cloudflare/skills (3,079 stars, last pushed yesterday), licensed Apache-2.0. It adds 22 tokens to every session and 1,355 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

airflow-state-store

Persists task and asset state across retries and DAG runs using Airflow 3.3's AIP-103 key/value stores (taskstatestore, assetstatestore) and the crash-safe ResumableJobMixin. Use when the user asks about task state store, checkpointing in tasks, persisting state across retries, job IDs surviving worker crashes…

astronomer/agents · 243 tokens

aws-cloudformation-lambda

Provides AWS CloudFormation patterns for Lambda functions, layers, API Gateway integration, event sources, cold start optimization, monitoring, logging, template validation, and deployment workflows. Use when creating Lambda functions with CloudFormation, configuring event sources, implementing cold start…

giuseppe-trisciuoglio/developer-kit · 70 tokens

aws-sdk-java-v2-lambda

Provides AWS Lambda patterns using AWS SDK for Java 2.x. Use when invoking Lambda functions, creating/updating functions, managing function configurations, working with Lambda layers, or integrating Lambda with Spring Boot applications.

giuseppe-trisciuoglio/developer-kit · 49 tokens

aws-lambda-php-integration

Provides AWS Lambda integration patterns for PHP with Symfony using the Bref framework. Creates Lambda handler classes, configures runtime layers, sets up SQS/SNS event triggers, implements warm-up strategies, and optimizes cold starts. Use when deploying PHP/Symfony applications to AWS Lambda, configuring API Gateway…

giuseppe-trisciuoglio/developer-kit · 126 tokens

aws-sdk-java-v2-messaging

Provides AWS messaging patterns using AWS SDK for Java 2.x for SQS queues and SNS topics. Handles sending/receiving messages, FIFO queues, DLQ, subscriptions, and pub/sub patterns. Use when implementing messaging with SQS or SNS.

giuseppe-trisciuoglio/developer-kit · 58 tokens

aws-sdk-java-v2-core

Provides AWS SDK for Java 2.x client configuration, credential resolution, HTTP client tuning, timeout, retry, and testing patterns. Use when creating or hardening AWS service clients, wiring Spring Boot beans, debugging auth or region issues, or choosing sync vs async SDK usage.

giuseppe-trisciuoglio/developer-kit · 62 tokens