pattern-matching
CommunityExhaustive, type-safe pattern matching in Effect
Software Engineering#TypeScript#type-safety#discriminated-unions#pattern-matching#Effect#exhaustive#Data.TaggedEnum
Authorfront-depiction
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Developers struggle with writing exhaustive, type-safe pattern matching for discriminated unions in TypeScript. This Skill provides guidance and patterns to use Data.TaggedEnum, $match, and related helpers to write declarative, compiler-checked branches across all variants.
Core Features & Use Cases
- Exhaustive, type-safe pattern matching across ADTs with Data.TaggedEnum
- Nested matches and multi-variant refinement using $match and $is
- Real-world scenarios: state machines, domain events, and result types
Quick Start
Define a TaggedEnum-based union, then apply WalletState.$match(state, { ... }) to handle every variant.
- User instruction: Show how to pattern match a WalletState with variants Disconnected, Connecting, Connected, and Error using the $match helper.
Dependency Matrix
Required Modules
None requiredComponents
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: pattern-matching Download link: https://github.com/front-depiction/claude-setup/archive/main.zip#pattern-matching Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.