Stateful Durable Objects for real-time apps, coordination, and persistent state management.
Works with
SQLite-backed storage with 10GB capacity, SQL queries, and atomic transactions; KV backend available for simpler key-value use cases
WebSocket hibernation API supports thousands of concurrent connections with automatic wake-up; message size limit increased to 32 MiB (Oct 2025)
Alarms API for scheduling future tasks, batching, and cleanup without relying on setTimeout / setInterval
RPC metho
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncloudflare-durable-objectsExecute the skills CLI command in your project's root directory to begin installation:
Fetches cloudflare-durable-objects from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate cloudflare-durable-objects. Access via /cloudflare-durable-objects in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
697
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
697
stars
Status: Production Ready ✅ Last Updated: 2026-01-21 Dependencies: cloudflare-worker-base (recommended) Latest Versions: [email protected], @cloudflare/[email protected] Official Docs: https://developers.cloudflare.com/durable-objects/
Recent Updates (2025):
getByName() API shortcut for named DOsScaffold new DO project:
npm create cloudflare@latest my-durable-app -- --template=cloudflare/durable-objects-template --ts
Or add to existing Worker:
// src/counter.ts - Durable Object class
import { DurableObject } from 'cloudflare:workers';
export class Counter extends DurableObject {
async increment(): Promise<number> {
let value = (await this.ctx.storage.get<number>('value')) || 0;
await this.ctx.storage.put('value', ++value);
return value;
}
}
export default Counter; // CRITICAL: Export required
// wrangler.jsonc - Configuration
{
"durable_objects": {
"bindings": [{ "name": "COUNTER", "class_name": "Counter" }]
},
"migrations": [
{ "tag": "v1", "new_sqlite_classes": ["Counter"] } // SQLite backend (10GB limit)
]
}
// src/index.ts - Worker
import { Counter } from './counter';
export { Counter };
export default {
async fetch(request: Request, env: { COUNTER: DurableObjectNamespace<Counter> }) {
const stub = env.COUNTER.getByName('global-counter'); // Aug 2025: getByName() shortcut
return new Response(`Count: ${await stub.increment()}`);
}
};
import { DurableObject } from 'cloudflare:workers';
export class MyDO extends DurableObject {
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env); // REQUIRED first line
// Load state before requests (optional)
ctx.blockConcurrencyWhile(async () => {
this.value = await ctx.storage.get('key') || defaultValue;
});
}
// RPC methods (recommended)
async myMethod(): Promise<string> { return 'Hello'; }
// HTTP fetch handler (optional)
async fetch(request: Request): Promise<Response> { return new Response('OK'); }
}
export default MyDO; // CRITICAL: Export required
// Worker must export DO class too
import { MyDO } from './my-do';
export { MyDO };
Constructor Rules:
super(ctx, env) firstctx.blockConcurrencyWhile() for storage initializationsetTimeout/setInterval (use alarms)Two backends available:
Enable SQLite in migrations:
{ "migrations": [{ "tag": "v1", "new_sqlite_classes": ["MyDO"] }] }
export class MyDO extends DurableObject {
sql: SqlStorage;
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.sql = ctx.storage.sql;
this.sql.exec(`
CREATE TABLE IF NOT EXISTS messages (id INTEGER PRIMARY KEY, text TEXT, created_at INTEGER);
CREATE INDEX IF NOT EXISTS idx_created ON messages(created_at);
PRAGMA optimize; // Feb 2025: Query performance optimization
`);
}
async addMessage(text: string): Promise<number> {
const cursor = this.sql.exec('INSERT INTO messages (text, created_at) VALUES (?, ?) RETURNING id', text, Date.now());
return cursor.one<{ id: number }>().id;
}
async getMessages(limit = 50): Promise<any[]> {
return this.sql.exec('SELECT * FROM messages ORDER BY created_at DESC LIMIT ?', limit).toArray();
}
}
SQL Methods:
sql.exec(query, ...params) → cursorcursor.one<T>() → single row (throws if none)cursor.one<T>({ allowNone: true }) → row or nullcursor.toArray<T>() → all rowsctx.storage.transactionSync(() => { ... }) → atomic multi-statementBest Practices:
? placeholders for parameterized queriesPRAGMA optimize after schema changesSTRICT keyword to table definitions to enforce type affinity and catch type mismatches early// Single operations
await this.ctx.storage.put('key', value);
const value = await this.ctx.storage.get<T>('key');
await this.ctx.storage.delete('key');
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
We added cloudflare-durable-objects from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
cloudflare-durable-objects fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
cloudflare-durable-objects fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
cloudflare-durable-objects has been reliable in day-to-day use. Documentation quality is above average for community skills.
cloudflare-durable-objects fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
We added cloudflare-durable-objects from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
We added cloudflare-durable-objects from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: cloudflare-durable-objects is focused, and the summary matches what you get after install.
Solid pick for teams standardizing on skills: cloudflare-durable-objects is focused, and the summary matches what you get after install.
Registry listing for cloudflare-durable-objects matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 56