What problem does it solve?
Effect Schema composition can become error-prone when you need multi-step transformations plus validation, because you must keep types, decoding/encoding behavior, and refinement rules consistent across stages.
Core Features & Use Cases
- Schema.decodeTo chaining: Connects different decoded/encoded types across multiple stages without manual glue code.
- .check-based validation: Adds filters and refinements to keep the value type stable while enforcing constraints (ranges, patterns, casing, UUID/ULID, etc.).
- Reusable transformations: Builds and applies SchemaTransformation objects for trimming, casing changes, mapping, and decode/encode logic.
- Advanced composition patterns: Covers structs, optional/nullable fields, branded types, defaults, array/object composition, and effectful validation.
- Use case: Parsing an API payload where fields require staged normalization (e.g., strings to numbers, then business rules), while returning precise, path-aware validation errors.
Quick Start
Use this skill to design an end-to-end Effect Schema that decodes raw input, applies sequential transformations, and then validates with .check before returning strongly typed results.