Reviews Cloudflare Durable Object code, wrangler config and a Durable Objects bill for what costs money. Finds an object kept awake and billed for wall-clock time it does not need (a pending timer, AbortSignal.timeout that is never cleared, even inside a helper, setInterval instead of an alarm, WebSockets that cannot hibernate, work held by waitUntil), objects and SQL storage that pile up because nobody deletes them (an object per visitor or per MCP session, McpAgent probes), and bills that cross the included amount by a few percent and are charged a whole started unit. Explains how the bill is computed: GB-seconds at 128 MB, one allowance for the whole account, rounding up. Gives the fix in code for each finding and ends a review with VERDICT: OK or VERDICT: CHANGE. Use when asked to review Durable Object code or config for cost, or why a Durable Objects bill is higher than the work done.
Durable Object Billing Review: Cloudflare Cost is a SKILL.md that reviews Cloudflare Durable Object code, wrangler config and a Durable Objects bill for what costs money; an agent buys it once for $0.05 over x402.
Not for
Correctness, security or design of a Durable Object: it looks at cost only. It does not cover other Cloudflare products (D1, R2, KV, Workers CPU), and it cannot read a live account, so figures such as GB-seconds and object counts must come from the person or from the usage query it names. Prices change; it works from the units and the rounding rule, and says so when a figure is not given.
Tested, honestly
Tested 2026-11-22 with a strong and a weak model.
With and without the skill
Results with and without the skill, for Sonnet and Haiku |
| with | without | with | without |
|---|
| Setups answered right (16 setups) |
| Setups answered right (16 setups) | 16/16 | 12/16 | 14/16 | 10/16 |
|---|
Same request and checks on both sides. Sonnet without the skill knew hibernating sockets, setInterval, McpAgent objects and deleted_classes (with a full wrangler deploy), the shared allowance and cart expiry, and answered OK on all five sound twins. It missed two measured facts about money: a limit from AbortSignal.timeout keeps the object billed until it ends (it called the alarm's 10-second limit fine, kept the helper's and added one, and for the bill at 100 % awake blamed an endpoint and advised a shorter limit), and an overage is charged per started million (it said $0.14, the invoice $12.50). It passed wrangler tail on a hedge, then expected tail to show the alarm's log lines. Haiku without the skill missed the same two facts and called two sound twins a storage risk from random keys; with the skill it still did on one of them.
Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.
- SonnetStrong model, claude-sonnet-5-5
- Right on all 16 setups on the 1.0.2 bytes, read by hand. It named the AbortSignal.timeout timer that keeps an alarm object billed in the alarm itself, in a shared helper the object calls, and as the cause of a bill at 100 % awake, said that a shorter limit would not help, and gave a controller with clearTimeout in finally. It priced 11,000 GB-seconds over the allowance as a whole started million, $12.50, said that wrangler tail does not show alarm invocations, that deleted_classes is not applied by versions upload, that McpAgent makes one object per initialize, and that the allowance is shared by the account. It moved setInterval to an alarm and gave abandoned carts an expiry alarm with deleteAll. It answered VERDICT: OK on all five sound setups: a cleared timer, hibernating sockets, MCP without objects, direct writes and carts that expire.
- HaikuWeak model, claude-haiku-5-5
- Right on 14 of 16 on the 1.0.2 bytes, read by hand. It named the uncleared AbortSignal.timeout timer in all three setups, including the helper and the bill at 100 % awake, charged the small overage as a whole $12.50, and was right on wrangler tail, deleted_classes, McpAgent and the shared allowance. It moved the setInterval counter to an alarm and answered OK on three sound setups, but it missed the OK verdict on two: on the counter that writes every view directly it again raised a storage pile-up from random paths a bot could send (Haiku without the skill raised the same there), and on the carts that expire through an alarm it asked for input checks and a cap on cart lines, which are not cost faults.
Full test summary
Example
Our own test text, before and after the skill ran. Excerpts only.
English · claude-sonnet-5-5
Before
// src/clock.ts — one object ("main") wakes every minute and calls our job endpoints
import { DurableObject } from "cloudflare:workers";
type Job = { name: string; url: string };
export class Clock extends DurableObject<Env> {
async alarm() {
await this.ctx.storage.setAlarm(Date.now() + 60_000);
const jobs = (await this.ctx.storage.get<Job[]>("jobs")) ?? [];…
After
**[TIMER-AWAKE]** `src/clock.ts`, `Clock.fire()`, the `AbortSignal.timeout(10_000)` call
`AbortSignal.timeout` keeps its timer pending until the 10 seconds pass, even when the endpoint answers in 1 to 2 seconds. Every minute, the object stays awake and billed for about 10 seconds after the work is done.…
What is in the file
- How the bill is computed
- What keeps an object awake
- The fix for a limit on a call
- What piles up
- Measure, do not guess
- Answer format
- Not a finding
- What not to do
Languages
Any language. Tried in: English.
License
Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.
Versions
Current version 1.0.2, updated 2026-11-22. Whoever bought an earlier version gets new ones free through the same re-download token.
v1.0.2 · 2026-11-22
Two sentences reworded with the same meaning, so that no published post on our blog shares a run of five words with the file (the blog build checks this). The side with the skill was run again in full on the new bytes. One check widened for both sides: describing sound code as "not AbortSignal.timeout" is not advice to use it. Result, one run per model and setup: Sonnet 16 of 16, Haiku 14 of 16 (was 15). Without the skill, re-scored: 12 and 10 of 16, unchanged.
v1.0.1 · 2026-11-22
The price rose from $0.03 to $0.05 by the owner's decision, which follows the checklist table for a gain of four setups for Sonnet. The file itself is identical to 1.0.0.
v1.0.0 · 2026-11-22
- First version. - Tests: 16 setups of our own in test/make-cases.mjs (4 code reviews with a cost fault, 5 sound twins of them, 7 questions about a bill or a symptom); test/control.mjs shows that a right answer passes every check and a plausible wrong one fails. - Measured on 22 November 2026, one run per model and setup: Claude Sonnet 16 of 16 with the skill, 12 of 16 without; Claude Haiku 14 of 16 with, 10 of 16 without. Sonnet's gain is two distinct facts, both about money: a timer from AbortSignal.timeout that keeps the object billed until the limit ends (three setups: an alarm, a helper the object calls, a bill at 100 % awake) and an overage charged as a whole started million, $12.50 instead of $0.14 (one setup). - Price $0.03 (30000 micro): two distinct facts missed by Sonnet without the skill, both cost money. - Inputs fixed before the skill was written, run again without the skill: the sound twin of the alarm timer and its faulty pair (the twin wrote rows nobody read and its limit equalled the interval), and the wrangler tail question (the first input had no table and led the answer away). - Checks widened after reading the answers, for both sides: "VERDICT: OK (nothing must change)" and a plain "Nothing must change" count as the OK verdict; $12.50 named as the rate per million is not counted as a wrong charge. - Check widened after reading the answers, for both sides: on the setInterval counter, writing each view directly in fetch (one upsert, no timer) counts as a fix beside an alarm, since that is the code of our own sound twin. Haiku with the skill gave this fix. - After the run, for the catalog's safety gate: the code example of the controller limit is an indented block instead of a fenced one, and its return type annotation is left to inference (the gate reads an angle-bracket type as an HTML tag). The words and the code are otherwise unchanged. - Measured again on 22 November 2026 on those final bytes, the side with the skill in full, one run per model and setup: Claude Sonnet 16 of 16 with the skill (unchanged), Claude Haiku 15 of 16 with (was 14); without the skill 12 and 10 of 16 as before. Haiku now answers OK on the carts that expire; on the counter that writes each view it still raised random paths. Price stays $0.03.
FAQ
Durable Object review: what comes back?
Each change that lowers the bill, as its own block: a code, the file or call, why it costs, and the fix. Nine codes name a timer that holds the object awake, setInterval, sockets that cannot hibernate, held work, objects nobody deletes, one object made for every MCP probe, a bill over the allowance, a changed queue time-out and a class removal. Things that look risky and are fine go in a separate list, so a cleared timer or a hibernating socket is never a finding. A review closes with VERDICT: OK or VERDICT: CHANGE.
Why can a two-second job bill for a minute?
A Durable Object is charged for the time it stays in memory. A time-out made with AbortSignal.timeout keeps its timer until the limit passes, even when the answer came at once, so an object that worked for two seconds waited for the rest of the limit. We measured about 61 seconds per wake on an alarm that fired every minute. The fix is a controller, a timer, and clearTimeout in finally, with the same abort reason.
Why did a tiny overage cost $12.50?
The allowance of 400,000 GB-seconds covers the whole account, and anything above it is charged for each million that is started. A small excess is billed like a full million. Requests and stored SQL data are rounded up the same way. So the skill works out the margin to the threshold and aims to stay under it, since using a little less above it saves nothing.
Does it help Claude Sonnet?
Two facts that cost money made the difference. Our sixteen setups: alarm objects, a chat room, two MCP servers, page-view counters, carts and seven questions about a bill. Sonnet alone got 12 right, with the skill 16. It knew hibernating sockets, the shared allowance, McpAgent and deleted_classes. It did not know that a limit from AbortSignal.timeout keeps the object billed until it ends: it approved one twice and once advised a shorter one. It priced 11,000 GB-s over at $0.14, where our invoice charged a whole million, $12.50. Haiku rose from 10 to 14.