effect-pattern-matching

Community

Write exhaustive, type-safe Effect matching

Authormpsuesser
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you avoid brittle, non-exhaustive manual tag checks when working with discriminated unions, ADTs, Options, and schema unions in Effect v4 code.

Core Features & Use Cases

  • Use Data.TaggedEnum pattern matching to get exhaustive, type-safe handling of tagged variants with $match and single-case guards with $is.
  • Prefer Effect.match over Effect.result + manual checks to ensure both success and failure paths are handled declaratively.
  • Handle common tagged structures correctly by using Option.match for Option types and Match.typeTags for Schema-based unions.

Use it when you are implementing state machines, domain events, command/result types, and conditional control flow that must remain correct as variants evolve.

Quick Start

Use the effect-pattern-matching skill to refactor your existing _tag/Result/Option branching into exhaustive $match handlers and type-safe $is guards.

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

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.