plugins/cloudflare/skills/durable-objects/SKILL.md
Use this skill when the user asks about Cloudflare Durable Objects, stateful serverless on Cloudflare, WebSocket coordination, distributed counters or locks, or managing Durable Objects with Pulumi.
npx skillsauth add nsheaps/ai-mktpl cloudflare-durable-objectsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Durable Objects provide strongly consistent, low-latency coordination and state for Workers. Each object is a single-threaded instance with persistent storage, ideal for WebSocket servers, counters, rate limiters, and collaborative apps.
cloudflare.WorkersScript with durableObjectBindingsexport class Counter {
state: DurableObjectState;
constructor(state: DurableObjectState) {
this.state = state;
}
async fetch(request: Request): Promise<Response> {
let value = (await this.state.storage.get<number>("count")) ?? 0;
value++;
await this.state.storage.put("count", value);
return new Response(value.toString());
}
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const id = env.COUNTER.idFromName("my-counter");
const stub = env.COUNTER.get(id);
return stub.fetch(request);
},
};
[durable_objects]
bindings = [
{ name = "COUNTER", class_name = "Counter" }
]
[[migrations]]
tag = "v1"
new_classes = ["Counter"]
const worker = new cloudflare.WorkersScript("do-worker", {
accountId,
name: "do-worker",
content: workerScript,
module: true,
});
// Durable Object bindings are part of the Worker script resource.
// The class must be exported from the Worker module.
// Migrations are handled via wrangler.toml, not Pulumi.
| Resource | Free | Paid | | -------------- | ----------- | -------------- | | Requests | 1M included | $0.15/M | | Duration | 400K GB-s | $12.50/M GB-s | | Storage reads | 1M/month | $0.20/M | | Storage writes | 1M/month | $1.00/M | | Storage | 1 GB | $0.20/GB/month |
tools
Reference material for Claude Code internals — the on-disk layout under ~/.claude and project-scope .claude, the plugin cache, session-env propagation, and the full hook lifecycle. Auto-recall when working on Claude-Code-related tasks: writing or debugging hooks, authoring plugins, inspecting session state, troubleshooting why an env var is or isn't visible to a Bash tool call, or when paths under ~/.claude or ~/.claude/plugins/ come up.
development
Manage GitHub App installation tokens in Claude Code sessions. Use when tokens expire, auth errors occur in long-running sessions, or when setting up GitHub App credentials for agent teams. <example>my github token expired</example> <example>refresh the github app token</example> <example>check token status</example> <example>set up github app authentication for this session</example>
tools
Auto-detect project formatting tools and configure edit-utils settings
tools
Use this skill when the user asks about 1Password, secrets management, retrieving credentials, using op CLI, service accounts, secret references, vault operations, or any task involving the 1Password CLI (op). Also use when needing to inject secrets into environment variables, read passwords or API keys from 1Password, or manage 1Password items from the command line.