effect
Installation
SKILL.md
Effect-TS Best Practices
Opinionated patterns for Effect-TS codebases. Effect provides typed functional programming with composable errors, dependency injection, and observability.
Critical Rules
- NEVER use
anyor type casts (as Type) - UseSchema.make()for branded types,Schema.decodeUnknown()for parsing - Don't use
catchAllwhen error type isnever- No errors to catch - Never use global
Errorin Effect channels - UseSchema.TaggedErrorfor domain errors - Ban
{ disableValidation: true }- Lint against this - Don't wrap safe operations in Effect - Only use
Effect.try()for throwing operations - Use
mapErrornotcatchAllCause- Distinguish expected errors from bugs - Never silently swallow errors - Failures MUST be visible in the Effect's error channel E