domain-modeling

Installation
SKILL.md

Effect Domain Modeling Skill

Use this skill when creating domain models, entities, value objects, or any types that represent core business concepts. This skill covers the complete lifecycle from type definition to runtime utilities.

Core Pattern: Schema.TaggedStruct + Schema.Data

The foundation of Effect domain modeling combines three key features:

  1. Schema.TaggedStruct - Automatic _tag discriminator for union types
  2. Schema.Data - Automatic Equal implementation for structural equality
  3. Schema.decodeSync - Type-safe constructors with validation
import { Schema, Equal } from "effect"

// Define each variant with TaggedStruct
export const Pending = Schema.TaggedStruct("pending", {
  id: Schema.String,
  createdAt: Schema.DateTimeUtcFromSelf,
Related skills
Installs
10
GitHub Stars
17
First Seen
Jan 24, 2026