durable-objects

durable-objects is a skill for Claude Code from fcakyon/claude-codex-settings. It costs 22 tokens per session (1,268 once invoked), scanned A, original, Apache-2.0.

A guide for Cloudflare Durable Objects, which are server-side objects that provide persistent state and coordinate work for a particular key or resource.

In plain words
What is it for?
Use it to build coordination logic, RPC methods, alarms, WebSocket handlers, storage, sharding, bindings, migrations, and tests.
Why use it?
It helps implement stateful edge applications correctly and use current APIs, configuration rules, and testing guidance.

Skill for Claude Code

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

Part of the cloudflare-skills plugin — 14 skills shipped together

Good fit Use it to build coordination logic, RPC methods, alarms, WebSocket handlers, storage, sharding, bindings, migrations, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcakyon/claude-codex-settings/durable-objects
About the project

claude-codex-settings is a collection of configurations and reusable extensions for Claude Code, OpenAI Codex, Cursor, and related coding tools. Developers use its skills, commands, hooks, agents, plugins, and MCP servers to shape coding-agent workflows and connect alternative model APIs. The catalogue entries are components of this collection that can be installed into supported coding tools.

fcakyon/claude-codex-settings · 1,139 stars · on GitHub · claudesettings.com

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 fcakyon/claude-codex-settings --skill durable-objects
Clone the repo
git clone --depth 1 https://github.com/fcakyon/claude-codex-settings

Made for: Claude Code.

Or install cloudflare-skills, the plugin that ships this one along with the rest of its 14 skills.

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/fcakyon/claude-codex-settings/durable-objects/github.svg)](https://agentmods.dev/skills/fcakyon/claude-codex-settings/durable-objects)
Your own site
<a href="https://agentmods.dev/skills/fcakyon/claude-codex-settings/durable-objects"><img src="https://agentmods.dev/badge/skills/fcakyon/claude-codex-settings/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/fcakyon/claude-codex-settings/durable-objects"><img src="https://agentmods.dev/badge/skills/fcakyon/claude-codex-settings/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,268 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.
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.01268
Opus 5 $0.00011 $0.00634
Sonnet 5 $0.00004 $0.00254
Haiku 4.5 $0.00002 $0.00127

Measured yesterday against content hash 9dda84ec5359, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 yesterday.

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> {
plugins/cloudflare-skills/skills/durable-objects/SKILL.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 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/
API Reference https://developers.cloudflare.com/durable-objects/api/
Best Practices https://developers.cloudflare.com/durable-objects/best-practices/
Examples https://developers.cloudflare.com/durable-objects/examples/

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

  • Stateless request handling (use plain Workers)
  • Maximum global distribution needs
  • High fan-out independent requests

Quick Reference

Read the full file on GitHub · 177 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. yesterday First seen · 177 lines · 22 tokens per session scan A 9dda84ec5359

Subscribe to this mod's changes

durable-objects is a skill published in the GitHub repository fcakyon/claude-codex-settings (1,139 stars, last pushed yesterday), licensed Apache-2.0. It adds 22 tokens to every session and 1,268 once invoked, about $0.0001 per session on Opus 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-09-09.