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
ctx adaptation, 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.