cf-durable-object-package

Scaffold Durable Object packages with Alchemy, env.d.ts, and Hono entrypoints.

10|Updated May 22, 2025
One-click install
npx skills add https://github.com/firtoz/cf-multiworker-starter-kit --skill cf-durable-object-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cf-durable-object-package
Source: https://github.com/firtoz/cf-multiworker-starter-kit/tree/main/agents/skills/cf-durable-object-package
Command: npx skills add https://github.com/firtoz/cf-multiworker-starter-kit --skill cf-durable-object-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add or change Durable Object packages under durable-objects/ (Alchemy, env.d.ts, Hono on the DO). Use when scaffolding with turbo gen durable-object, editing durable-objects/*/alchemy.run.ts, workers/app.ts, or env.d.ts for a DO. Not for web app bindings or cross-worker rpc—see cf-web-alchemy-bindings and cf-worker-rpc-turbo.

Core Features & Use Cases

  • Scaffold or modify Durable Object packages under durable-objects/ with Alchemy integration, env.d.ts typings, and a Hono-based DO app.
  • Update and reuse generator templates or existing examples to support WebSocket RPC, DO persistence, and worker entrypoints.
  • Use Case: When adding a new Durable Object module or refactoring an existing one to align with a specific DO namespace.

Quick Start

Create or update a durable-objects package under durable-objects/ and wire up alchemy, env.d.ts, and a Hono route as the DO entrypoint.

Frequently Asked Questions about cf-durable-object-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Cloudflare Durable Object package in a monorepo?

To scaffold a Durable Object package, this Skill automates creating the directory structure under durable-objects/ and configures alchemy.run.ts, env.d.ts, and a Hono-based entrypoint for your workers.

How do I configure Cloudflare Durable Object bindings with Alchemy and Hono?

Configuring Durable Object bindings with Alchemy involves updating alchemy.run.ts and wiring the Hono route in workers/app.ts, ensuring proper exports for the DO to be consumed by the web app and worker environment.

What is the best way to add WebSocket RPC and persistence to a Cloudflare Durable Object?

The best way to add WebSocket RPC and persistence is by reusing generator templates or existing examples within the Durable Object package to support these specific DO workflows.

Does this Durable Object scaffolding tool support web app bindings or cross-worker RPC?

This Durable Object scaffolding tool does not support web app bindings or cross-worker RPC; you should use cf-web-alchemy-bindings and cf-worker-rpc-turbo for those specific tasks.

Why do I need to update env.d.ts when modifying a Cloudflare Durable Object package?

You need to update env.d.ts when modifying a Durable Object package to ensure correct TypeScript typings are maintained for the DO namespace consumed by the worker environment.