adding-a-new-durable-object-mixin
OfficialDesign Durable Object mixins the right way
System Documentation
What problem does it solve?
This Skill prevents Durable Object mixins from drifting away from the repository’s required API design, type-safety rules, and Cloudflare runtime expectations, which otherwise leads to brittle compositions and failing tests.
Core Features & Use Cases
- Spec and validate a mixin’s runtime behavior before implementation so the Durable Object surface, protected capabilities, and lifecycle interactions are unambiguous.
- Compose mixins correctly with the repo’s Durable Object constructor/type patterns to keep
Base<Env>compatibility, preserve generics, and ensure capability requirements remain correctly layered. - Add thorough documentation and tests for durable-object-utils including type tests, worker-pool unit tests, and optional E2E coverage when runtime behavior depends on Worker/DO/D1 realities.
- Reference implementation guidance for common low-level mixin responsibilities such as protected
ctxadaptation, lifecycle hooks, alarm multiplexing, scheduling, KV/SQLite helpers, and the shared test harness entrypoint.
Quick Start
Ask the AI to guide you through adding a new withX Durable Object mixin under packages/shared/src/durable-object-utils by first reviewing the needed route/method/state, the exact protected capabilities it should consume, and the specific tests and runtime checks required by the repo.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: adding-a-new-durable-object-mixin Download link: https://github.com/iterate/iterate/archive/main.zip#adding-a-new-durable-object-mixin Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.