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.
npx agentmods add skills/secondsky/claude-skills/cloudflare-durable-objectsnpx skills add secondsky/claude-skills --skill cloudflare-durable-objectsgit clone --depth 1 https://github.com/secondsky/claude-skillsWrote 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.
[](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-durable-objects)<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-durable-objects"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-durable-objects.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00043 | $0.05395 |
| Opus 5 | $0.00022 | $0.02697 |
| Sonnet 5 | $0.00009 | $0.01079 |
| Haiku 4.5 | $0.00004 | $0.00539 |
Grade A, and why
cloudflare-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> { How it starts
The opening of the file, as written. The whole thing — 581 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Durable Objects
Status: Production Ready ✅ Last Updated: 2025-11-25 Dependencies: cloudflare-worker-base (recommended) Latest Versions: [email protected]+, @cloudflare/[email protected]+ Official Docs: https://developers.cloudflare.com/durable-objects/
Table of Contents
What are Durable Objects? • Quick Start • When to Load References • Class Structure • State API • WebSocket Hibernation • Alarms • RPC vs HTTP • Stubs & Routing • Migrations • Common Patterns • Critical Rules • Known Issues
What are Durable Objects?
Globally unique, stateful objects with single-point coordination, strong consistency (ACID), WebSocket Hibernation (thousands of connections), SQLite storage (1GB), and alarms API.
Use for: Chat rooms, multiplayer games, rate limiting, session management, leader election, stateful workflows
Quick Start (10 Minutes)
Option 1: Scaffold New DO Project
npm create cloudflare@latest my-durable-app -- \
--template=cloudflare/durable-objects-template --ts --git --deploy false
cd my-durable-app && bun install && npm run dev
Option 2: Add to Existing Worker
1. Install types:
bun add -d @cloudflare/workers-types
2. Create DO class (src/counter.ts):
import { DurableObject } from 'cloudflare:workers';
export class Counter extends DurableObject {
async increment(): Promise<number> {
let value: number = (await this.ctx.storage.get('value')) || 0;
await this.ctx.storage.put('value', ++value);
return value;
}
}
export default Counter; // CRITICAL
What ships with it
38 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.
- references/advanced-sql-patterns.md 16 KB
- references/alarms-api.md 6.5 KB
- references/best-practices.md 8.5 KB
- references/common-patterns.md 17 KB
- references/data-modeling.md 17 KB
- references/error-codes.md 7.7 KB
- references/gradual-deployments.md 14 KB
- references/migration-cheatsheet.md 3.2 KB
- references/migrations-guide.md 7.3 KB
- references/monitoring-debugging.md 18 KB
- references/performance-optimization.md 16 KB
- references/rpc-metadata.md 17 KB
- references/rpc-patterns.md 6.5 KB
- references/security-best-practices.md 16 KB
- references/state-api-reference.md 6.0 KB
- references/stubs-routing.md 11 KB
- references/top-errors.md 10 KB
- references/typescript-config.md 8.3 KB
- references/vitest-testing.md 18 KB
- references/websocket-hibernation.md 6.3 KB
- references/wrangler-commands.md 3.4 KB
- scripts/check-versions.sh 593 B runs code
- scripts/migration-generator.sh 13 KB runs code
- scripts/setup-vitest-do.sh 10 KB runs code
- scripts/validate-do-config.sh 10 KB runs code
- templates/alarms-api-do.ts 6.1 KB runs code
- templates/basic-do.ts 2.9 KB runs code
- templates/gradual-deployment-config.jsonc 10 KB
- templates/location-hints.ts 6.8 KB runs code
- templates/multi-do-coordination.ts 7.8 KB runs code
- templates/package.json 384 B
- templates/rpc-metadata-do.ts 11 KB runs code
- templates/rpc-vs-fetch.ts 6.0 KB runs code
- templates/state-api-patterns.ts 5.8 KB runs code
- templates/ttl-cleanup-do.ts 18 KB runs code
- templates/vitest-do-test.ts 12 KB runs code
- templates/websocket-hibernation-do.ts 6.0 KB runs code
- templates/wrangler-do-config.jsonc 2.0 KB
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.
- yesterday First seen · 581 lines · 43 tokens per session scan A 8f1c9245551c
cloudflare-durable-objects is a skill published in the GitHub repository secondsky/claude-skills (214 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 5,395 once invoked, about $0.0002 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-03.
Other skills, from other repositories
remember
Record why something is the way it is — a decision and its reasoning, a lesson that cost time, or a standing constraint. Use when the reasoning behind a choice would be expensive to reconstruct later.
bootstrap
Set up chamnan in this repository for the first time — build the architecture index, measure how well the code describes itself, fill in missing file comments, and record a baseline. Run once per repo.
milestone
Record a change that reshaped the repository — what moved, why it was worth doing, and which areas it touched. Use after a migration, a rewrite, or a decision that changed how part of the system works.
resume
Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.
capture
Write down a procedure worth keeping — a multi-step process, a trap that cost real time, or something that has now come up three times. Use it the moment you finish such a task, while the details are still exact.
promote
Turn a scratch script into a permanent tool this repo keeps. Use when a check, report, or analysis has proved worth running more than once.