Agent skill

Durable Objects

by swyxio in swyxio/skills

Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms…

MITAuto-check passedBackend & APIs

Install Durable Objects

skills CLI
$ npx skills add swyxio/skills --skill durable-objects -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swyxio/skills durable-objects --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/durable-objects .claude/skills/durable-objects && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
durable-objects
GitHub stars
172
Token cost
~501 tokens
SKILL.md length
203 words
Files
4 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms…

  • Works in 7 steps: Name the coordination key and… → Identify object-owned persistent state.… → Prefer typed RPC for new internal… → …
  • Ordinary stateless Workers
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Cloudflare Agents SDK work already owned by the agents-sdk skill

What it does

Durable Objects is an agent skill from swyxio/skills. Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms, WebSocket hibernation, bindings, or class lifecycle. Do not trigger for ordinary stateless Workers or Cloudflare Agents SDK work already owned by the agents-sdk skill.

Its SKILL.md is about 500 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/rules.md`, `references/testing.md` and `references/workers.md`).

It sits in Backend & APIs, covering Realtime and WebSockets. It works with Cloudflare Durable Objects and Cloudflare. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • Ordinary stateless Workers
  • Cloudflare Agents SDK work already owned by the agents-sdk skill

Example prompts

  • “/durable-objects”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Name the coordination key and deterministic object ID. Avoid a global object
  2. Identify object-owned persistent state. Treat caches and external stores as
  3. Prefer typed RPC for new internal interfaces; retain fetch() when HTTP
  4. Keep state transitions deterministic. External I/O can interleave, so fence,
  5. Use blockConcurrencyWhile() for bounded initialization, not routine requests
  6. Remember that one object has one alarm. Persist progress, make the handler
  7. Design for constructor reruns and eviction. In-memory state is not durable.

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Durable Objects loads about 501 tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 94 tokens; SKILL.md has 203 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~501
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 203 words, ~501 tokens.

Download SKILL.mdSave it as .claude/skills/durable-objects/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
durable-objects
description
Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms, WebSocket hibernation, bindings, or class lifecycle. Do not trigger for ordinary stateless Workers or Cloudflare Agents SDK work already owned by the `agents-sdk` skill.

Durable Objects

Use Durable Objects when one named object should serialize access to its own state. Retrieve current Cloudflare documentation for APIs, bindings, storage, class lifecycle, limits, and pricing.

Load only the relevant reference:

  • rules.md for partitioning, storage, concurrency, RPC, alarms, and WebSockets.
  • testing.md for Workers Vitest and alarm tests.
  • workers.md for bindings, lifecycle configuration, generated types, and observability.

Design contract

  1. Name the coordination key and deterministic object ID. Avoid a global object unless deliberate low-volume global serialization is the requirement.
  2. Identify object-owned persistent state. Treat caches and external stores as separate consistency boundaries.
  3. Prefer typed RPC for new internal interfaces; retain fetch() when HTTP semantics or a live compatibility contract requires it.
  4. Keep state transitions deterministic. External I/O can interleave, so fence, serialize, or reconcile the affected transition.
  5. Use blockConcurrencyWhile() for bounded initialization, not routine requests or slow external work.
  6. Remember that one object has one alarm. Persist progress, make the handler idempotent, and define bounded failure handling.
  7. Design for constructor reruns and eviction. In-memory state is not durable.

Verify the exact class export, binding target, lifecycle declaration, and live path touched by the change. Test only the relevant concurrency, restart, alarm, or WebSocket behavior.

© swyxio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in durable-objects of swyxio/skills.

  • SKILL.md
  • references/rules.md
  • references/testing.md
  • references/workers.md

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Durable Objects next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Durable Objects compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Durable Objects this skillswyxio/skills172—~501Automated safety check: PassMIT
Durable Objectshodgef/apiker1274 repos~1.5kAutomated safety check: PassMIT
Cloudflare WorkersEpicenterHQ/epicenter4.8k—~576Automated safety check: PassCustom licence
Olore Partyserver Latestolorehq/olore103—~834Automated safety check: PassMIT
Durable Objectscloudflare/skills3k2 repos~1.5kAutomated safety check: PassApache-2.0
Nitro Server Toolkitantfu/skills5.9k—~948Automated safety check: PassMIT

Similar skills

  • Durable Objects

    hodgef/apiker

    Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 4 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Cloudflare Workers

    EpicenterHQ/epicenter

    Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.

    4.8k GitHub stars~576 tokensUpdated today
    Backend & APIsAuto-check passed
  • Local partyserver documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~834 tokensUpdated today
    Backend & APIsAuto-check passed
  • Durable Objects

    cloudflare/skills

    Official

    Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

    3k GitHub starsUsed in 2 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.

    5.9k GitHub stars~948 tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Sharehtml Collaboration

    jonesphillip/sharehtml

    A skill your agent uses when a user wants to deploy, update, diff, pull, or review feedback on documents managed with the sharehtml CLI.

    132 GitHub stars~902 tokensUpdated 6 mo ago
    Backend & APIsAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    172 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    172 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    172 GitHub stars~4.3k tokensUpdated 2 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    172 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    172 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    172 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Durable Objects

What does Durable Objects do?

Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms…. Durable Objects is an agent skill from swyxio/skills. Design, implement, debug, or test Cloudflare Durable Objects when the task specifically involves per-key coordination, strongly consistent object-owned state, RPC or HTTP interfaces, alarms, WebSocket hibernation, bindings, or class lifecycle.

When should I use Durable Objects?

Durable Objects fits situations like: ordinary stateless Workers; cloudflare Agents SDK work already owned by the agents-sdk skill.

How do I install Durable Objects in Claude Code?

Run `npx skills add swyxio/skills --skill durable-objects -a claude-code`. Or copy the skill folder (durable-objects in swyxio/skills) into .claude/skills/durable-objects in your project. Claude Code loads it when a task matches its description.

How do I install Durable Objects in Codex?

Run `npx skills add swyxio/skills --skill durable-objects -a codex`. Or copy the skill folder (durable-objects in swyxio/skills) into .agents/skills/durable-objects in your project. Codex loads it when a task matches its description.

Can I use Durable Objects in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swyxio/skills --skill durable-objects -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/durable-objects, .gemini/skills/durable-objects, .github/skills/durable-objects and .opencode/skills/durable-objects in your project.

What does Durable Objects need to run?

SKILL.md names no scripts, command-line tools or credentials: Durable Objects is instructions for the agent only.

Does Durable Objects access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Durable Objects safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Durable Objects use?

Durable Objects is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Durable Objects use?

About 501 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.7k tokens, read only when the agent opens those files.

What are the alternatives to Durable Objects?

Skills that share tags, products or a category with Durable Objects: Durable Objects (hodgef/apiker, 127 stars), Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars), Olore Partyserver Latest (olorehq/olore, 103 stars) and Durable Objects (cloudflare/skills, 3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Durable Objects?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 172 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

Source: swyxio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.