effect-schema-composition

Community

Compose and validate multi-stage Effect Schemas

Authormpsuesser
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

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: effect-schema-composition
Download link: https://github.com/mpsuesser/pi-effect-harness/archive/main.zip#effect-schema-composition

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.