cloudflare-durable-objects:setup

cloudflare-durable-objects:setup is a command for coding agents from secondsky/claude-skills. It costs 32 tokens per session (4,293 once invoked), scanned A, original, MIT.

An interactive setup command for starting a Cloudflare Durable Objects project or adding Durable Objects to an existing Workers project. It creates configuration, bindings, migrations, types, and starter code.

In plain words
What is it for?
Use it to create basic, WebSocket, or SQL-storage Durable Objects projects, optionally with a Vitest test setup.
Why use it?
It removes the need to assemble the required project files and settings by hand. It helps avoid setup mistakes before the application is running.

Command

Part of the cloudflare-durable-objects plugin — 1 skill, 5 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/secondsky/claude-skills/do-setup
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Or install cloudflare-durable-objects, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-durable-objects:setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/secondsky/claude-skills/do-setup.svg)](https://agentmods.dev/commands/secondsky/claude-skills/do-setup)
Your own site
<a href="https://agentmods.dev/commands/secondsky/claude-skills/do-setup"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/do-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.04293
Opus 5 $0.00016 $0.02146
Sonnet 5 $0.00006 $0.00859
Haiku 4.5 $0.00003 $0.00429

Measured yesterday against content hash 18a326b8d239, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-durable-objects:setup scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request): Promise<Response> {
plugins/cloudflare-durable-objects/commands/do-setup.md · 677 lines

How it starts

The opening of the file, as written. The whole thing — 677 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Durable Objects Setup Command

Interactive command to initialize a new Durable Objects project with proper configuration, bindings, migrations, and boilerplate code.

Overview

This command guides through the complete setup process for Cloudflare Durable Objects, ensuring correct configuration from the start. It handles:

  • Project scaffolding (new or existing project)
  • Durable Object class creation with proper exports
  • wrangler.jsonc configuration (bindings, migrations)
  • TypeScript setup and type definitions
  • Test environment setup (optional Vitest)
  • Template selection (basic, WebSocket, SQL storage)

Step 1: Gather Project Requirements

Use AskUserQuestion tool to collect setup preferences:

Question 1: Project Type

Question: "Are you setting up a new project or adding Durable Objects to an existing project?" Header: "Project Type" Options:

  • New Project - Create new Cloudflare Workers project with Durable Objects
    • Description: "Scaffold a complete new project using npm create cloudflare@latest"
  • Existing Project - Add Durable Objects to existing Workers project
    • Description: "Configure Durable Objects in an existing wrangler.jsonc"

Question 2: Storage Backend

Question: "Which storage backend do you want to use for your Durable Object?" Header: "Storage Backend" Options:

  • SQL Storage (Recommended) - SQLite with 1GB limit per DO instance
    • Description: "Structured data with ACID transactions, recommended for most use cases"
  • Key-Value Storage - Simple KV storage with 128MB limit
    • Description: "Simpler API, good for basic state management"
  • Both SQL + KV - Use both storage backends
    • Description: "SQL for structured data, KV for simple key-value pairs"

Question 3: Use Case Pattern

Question: "What will your Durable Object primarily be used for?" Header: "Use Case" Options:

  • WebSocket Chat/Real-time - WebSocket server with hibernation
    • Description: "Chat rooms, collaborative editing, multiplayer games"
  • Session Management - Per-user session storage
    • Description: "User sessions, authentication state, preferences"
  • Rate Limiting - Request rate limiting per user/IP
    • Description: "API rate limiting, DDoS protection"
  • Data Aggregation - Collect and aggregate data
    • Description: "Analytics, metrics collection, data pipelines"
  • Custom/Other - General-purpose Durable Object
    • Description: "Start with basic template and customize"

Read the full file on GitHub · 677 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 677 lines · 32 tokens per session scan A 18a326b8d239

Subscribe to this mod's changes

cloudflare-durable-objects:setup is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 4,293 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.