effect-domain-modeling

Community

Build production-ready Effect domain models

Authormpsuesser
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Domain modeling in TypeScript often devolves into loosely typed objects, fragile discriminated unions, and ad-hoc validation and pattern matching. This skill solves that by guiding you to define runtime-validated, discriminated domain types with first-class constructors, guards, and exhaustive matchers using Effect v4 Schema utilities.

Core Features & Use Cases

  • Schema-tagged ADTs with _tag: Use Schema.TaggedStruct to define discriminated unions cleanly and exhaustively.
  • Validated constructors: Generate type-safe constructors with Schema.decodeSync so invalid input is rejected at runtime.
  • Guards, matching, and utilities: Provide Schema.is-based predicates and Match.typeTags pattern matching for safe branching on variants.
  • Equality, ordering, and equivalence: Prefer deep structural equality via Equal.equals, and add field-based Equivalence when semantics require it.
  • Advanced modeling patterns: Support recursive schemas (Schema.suspend), branded validation constraints (Brand.make), and typeclass instances when appropriate.
  • Documentation and consistency standards: Enforce JSDoc with @category, @since, and runnable @example imports using namespace import style.

Quick Start

Use this skill to create a domain module for a discriminated union entity by defining variants with Schema.TaggedStruct, adding Schema.decodeSync constructors, and generating Schema.is guards plus a Match.typeTags matcher for exhaustive handling of each _tag.

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

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.