
from pi-effect-harness18
Guides the choice between Witness and Capability patterns in Effect.ts for dependency injection and decoupled domain models.
This skill provides a technical decision framework for developers using the Effect.ts ecosystem. It teaches how to move from 'Hard Coupling' (fields in schemas) to 'Soft Coupling' (injecting values via Context), helping keep domain models minimal and improving testability.
Use this skill when designing dependency injection in TypeScript projects using Effect, specifically when deciding whether a value should be a 'Witness' (existence only, e.g., Request ID) or a 'Capability' (behavioral, e.g., a Database service).
Any coding agent with TypeScript/Effect.ts expertise (e.g., Cursor, Claude Code, Copilot).
This skill has not been reviewed by our automated audit pipeline yet.