1. Habit
  2. Skills
  3. Durable Objects skill
cloudflare · 107K installs

Durable Objects skill
Runs by itself, PR touches Durable Objects.

Durable Object code stays safe.

Install the Durable Objects skill and make it a habit: follow https://gethabit.dev/skills/cloudflare/durable-objects.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

107K installs3K starsApache-2.0 licenceSource on GitHub ↗

Durable Objects

by cloudflare · 107K installs

The skill

The durable objects skill helps agents build, debug and review Cloudflare Durable Objects code for persistent state and coordination, with current docs, wrangler config, storage, alarms and Vitest testing.

Only when you ask.

The habit

Durable Object code stays safe.

↻ Runs by itselfPR touches Durable Objects

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleOne pull request per run, no retries.

  1. 01

    Fetch current docs

    Pull the Durable Objects docs, API reference and best practices pages instead of relying on old knowledge.

  2. 02

    Read the references

    Check the change against references/rules.md, references/workers.md and references/testing.md.

  3. 03

    Check the rules

    Look for one DO per coordination atom, getByName() routing, SQLite storage, persist-first writes and one alarm per DO.

  4. 04

    Flag anti-patterns

    Flag a single global DO, state kept only in memory, and await between related storage writes.

  5. 05

    Run the tests

    Run the Vitest suite with the Cloudflare integration and record the result.

  6. 06

    Update the board

    Write new findings to the board and close the ones the change fixed.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Durable Objects skill helps.

Use it when

  • ✓ You build chat rooms, games or per-user state
  • ✓ You configure DO bindings and migrations
  • ✓ You review existing DO code

Skip it when

  • – Your requests are stateless
  • – You need high fan-out independent requests

Questions

Durable Objects skill, answered.

Why fetch the docs every run?

The skill says model knowledge of Durable Objects may be outdated and prefers retrieval.

Does the loop deploy anything?

No. It reviews and tests the change only.

What about access rights?

The skill says Durable Objects follow the Worker that implements them, so the review checks the Worker's role scope.

How do I install the Durable Objects skill?

Copy the prompt at the top into your agent. It installs the skill from cloudflare/skills and sets up the habit. Or run npx skills add cloudflare/skills --skill durable-objects.

Is the Durable Objects skill free?

Yes. It is published under Apache-2.0. Habit is free too.

Durable Objects. Now as a habit.

Install the Durable Objects skill and make it a habit: follow https://gethabit.dev/skills/cloudflare/durable-objects.md

  • Free
  • No account
  • Undo in one line

All cloudflare skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by cloudflare, published under Apache-2.0. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.