Durable Objects
hodgef/apiker
Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
$ npx skills add cloudflare/skills --skill durable-objects -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cloudflare/skills durable-objects --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/durable-objects .claude/skills/durable-objects && rm -rf skills-srcUse ~/.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/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .claude/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cloudflare/skills/tree/main/skills/durable-objectsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cloudflare/skills --skill durable-objects -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cloudflare/skills durable-objects --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/durable-objects .agents/skills/durable-objects && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .agents/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cloudflare/skills --skill durable-objects -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cloudflare/skills durable-objects --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/durable-objects .cursor/skills/durable-objects && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .cursor/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cloudflare/skills.git --path skills/durable-objects--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cloudflare/skills --skill durable-objects -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cloudflare/skills durable-objects --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/durable-objects .gemini/skills/durable-objects && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .gemini/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cloudflare/skills durable-objectsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cloudflare/skills --skill durable-objects -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/durable-objects .github/skills/durable-objects && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .github/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cloudflare/skills --skill durable-objects -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cloudflare/skills durable-objects --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/durable-objects .opencode/skills/durable-objects && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "durable-objects" agent skill from https://github.com/cloudflare/skills/tree/main/skills/durable-objects into .opencode/skills/durable-objects/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "durable-objects", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
durable-objectsBuild, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
Durable Objects is an agent skill from cloudflare/skills, published by the product's own GitHub organization. Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
Its SKILL.md is about 1.5k 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 Agent memory. It works with Cloudflare Durable Objects, Cloudflare Workers and Cloudflare. The repository describes itself as: Skills for teaching agents how to build on Cloudflare. The licence is Apache-2.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 41e0d19. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and jsonc).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developers.cloudflare.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Durable Objects loads about 1.5k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 395 words of instructions outside code blocks.
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.
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.
The full file from cloudflare/skills at commit 41e0d19, republished under its Apache-2.0 licence (© cloudflare). 395 words, ~1,510 tokens.
.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.Build stateful, coordinated applications on Cloudflare's edge using Durable Objects.
Your knowledge of Durable Objects APIs and configuration may be outdated. Prefer retrieval over pre-training for any Durable Objects task.
Fetch the relevant doc page when implementing features.
./references/rules.md - Core rules, storage, concurrency, RPC, alarms./references/workers.md - Workers handlers, types, wrangler config, observabilitySearch: blockConcurrencyWhile, idFromName, getByName, setAlarm, sql.exec
| 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 |
// wrangler.jsonc
{
"durable_objects": {
"bindings": [{ "name": "MY_DO", "class_name": "MyDurableObject" }]
},
"migrations": [{ "tag": "v1", "new_sqlite_classes": ["MyDurableObject"] }]
}import { DurableObject } from "cloudflare:workers";
export interface Env {
MY_DO: DurableObjectNamespace<MyDurableObject>;
}
export class MyDurableObject extends DurableObject<Env> {
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
ctx.blockConcurrencyWhile(async () => {
this.ctx.storage.sql.exec(`
CREATE TABLE IF NOT EXISTS items (
id INTEGER PRIMARY KEY AUTOINCREMENT,
data TEXT NOT NULL
)
`);
});
}
async addItem(data: string): Promise<number> {
const result = this.ctx.storage.sql.exec<{ id: number }>(
"INSERT INTO items (data) VALUES (?) RETURNING id",
data
);
return result.one().id;
}
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const stub = env.MY_DO.getByName("my-instance");
const id = await stub.addItem("hello");
return Response.json({ id });
},
};getByName() for deterministic routing - Same input = same DO instancenew_sqlite_classes in migrationsblockConcurrencyWhile() for schema setup onlysetAlarm() replaces any existing alarmDurable Objects do not have separate roles or permissions; access follows the Worker that implements them. Retrieve the current Durable Objects authorization guidance before granting observability or Data Studio access, and scope the Workers role to the intended Worker or Workers product.
blockConcurrencyWhile() on every request (kills throughput)await between related storage writes (breaks atomicity)blockConcurrencyWhile() across fetch() or external I/O// Deterministic - preferred for most cases
const stub = env.MY_DO.getByName("room-123");
// From existing ID string
const id = env.MY_DO.idFromString(storedIdString);
const stub = env.MY_DO.get(id);
// New unique ID - store mapping externally
const id = env.MY_DO.newUniqueId();
const stub = env.MY_DO.get(id);// SQL (synchronous, recommended)
this.ctx.storage.sql.exec("INSERT INTO t (c) VALUES (?)", value);
const rows = this.ctx.storage.sql.exec<Row>("SELECT * FROM t").toArray();
// KV (async)
await this.ctx.storage.put("key", value);
const val = await this.ctx.storage.get<Type>("key");// Schedule (replaces existing)
await this.ctx.storage.setAlarm(Date.now() + 60_000);
// Handler
async alarm(): Promise<void> {
// Process scheduled work
// Optionally reschedule: await this.ctx.storage.setAlarm(...)
}
// Cancel
await this.ctx.storage.deleteAlarm();Read the testing reference before configuring a suite or writing Durable Object tests. It routes to current setup, APIs, and examples and identifies the behavior to cover.
© cloudflare, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in skills/durable-objects of cloudflare/skills.
Open the folder on GitHubat commit 41e0d19
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in cloudflare/skills, which our catalogue first saw on October 7, 2026.
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Durable Objects this skillcloudflare/skills | 3k | 2 repos | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Durable Objectshodgef/apiker | 127 | 4 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Sharehtml Collaborationjonesphillip/sharehtml | 132 | — | ~902 | Automated safety check: Pass | Apache-2.0 | |
| Apikerhodgef/apiker | 127 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Cloudflare WorkersEpicenterHQ/epicenter | 4.8k | — | ~576 | Automated safety check: Pass | Custom licence | |
| Cloudflareericrisco/rsc-harness | 156 | — | ~2.6k | Automated safety check: Pass | MIT |
hodgef/apiker
Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.
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.
hodgef/apiker
Develop, review, and extend the Apiker library — a framework for building serverless REST APIs on Cloudflare Workers + Durable Objects.
EpicenterHQ/epicenter
Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.
ericrisco/rsc-harness
A skill your agent uses when working on Cloudflare's edge platform — wrangler.jsonc bindings, choosing between D1/KV/R2/Durable Objects/Queues, deploying a Worker or SPA via Static Assets, or…
hoodini/ai-agents-skills
Build and deploy on Cloudflare's edge platform. An agent skill from hoodini/ai-agents-skills.
cloudflare/skills
Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.
cloudflare/skills
Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext.
cloudflare/skills
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
cloudflare/skills
Build or maintain Cloudflare Sandbox apps on @cloudflare/sandbox@next (SDK 1.0 preview).
cloudflare/skills
Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.
cloudflare/skills
Cloudflare Workers best practices for production applications.
Categories
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination. Durable Objects is an agent skill from cloudflare/skills, published by the product's own GitHub organization. Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
Durable Objects fits situations like: tasks that involve Agent memory.
Run `npx skills add cloudflare/skills --skill durable-objects -a claude-code`. Or copy the skill folder (skills/durable-objects in cloudflare/skills) into .claude/skills/durable-objects in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cloudflare/skills --skill durable-objects -a codex`. Or copy the skill folder (skills/durable-objects in cloudflare/skills) into .agents/skills/durable-objects in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cloudflare/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.
SKILL.md names no scripts, command-line tools or credentials: Durable Objects is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: developers.cloudflare.com. This is read from the text; nothing was executed.
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.
Durable Objects is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k 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 3.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Durable Objects: Durable Objects (hodgef/apiker, 127 stars), Sharehtml Collaboration (jonesphillip/sharehtml, 132 stars), Apiker (hodgef/apiker, 127 stars) and Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cloudflare (a GitHub organization, an official publisher) maintains it in cloudflare/skills, which has 2,999 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 1, 2026.
Source: cloudflare/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.