Effect-TS Expert

Refactor TypeScript codebases to adopt Effect-TS patterns for typed errors and Layers.

110|9|Updated Dec 16, 2025
One-click install
npx skills add https://github.com/ojowwalker77/Claude-Matrix --skill effect-ts-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Effect-TS Expert
Source: https://github.com/ojowwalker77/Claude-Matrix/tree/main/skills/effect-ts
Command: npx skills add https://github.com/ojowwalker77/Claude-Matrix --skill effect-ts-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reduce friction building and maintaining Effect-TS applications by providing concrete patterns for typed errors, dependency injection via Layers, concurrency primitives, and safe resource management so developers avoid common anti-patterns and runtime defects.

Core Features & Use Cases

  • Typed Error Design & Recovery: How to model domain errors with tagged errors, recover with catchTag/catchAll, and convert to Either/Option.
  • Dependency Injection with Layers: Defining Context.Tags, composing Layer.succeed/Layer.effect/scoped layers, and providing dependencies at the composition root.
  • Concurrency & Fibers: Forking, joining, racing, bounded parallelism, semaphores, queues, and graceful interruption and finalizers.
  • Testing, Schema, and Streams: Using TestClock and test layers, Schema validation for inputs and config, and Stream patterns for batched or rate-limited processing.
  • Use Case Example: Refactor a service to provide a typed UserRepository Layer, run concurrent fetches with bounded concurrency, and ensure deterministic tests with mock layers.

Quick Start

Refactor a TypeScript handler to use Effect.gen with tagged errors, provide a UserRepository Layer at the composition root, and limit concurrent background tasks with a semaphore.

Frequently Asked Questions about Effect-TS Expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I model typed errors in Effect-TS and recover from specific failures?

Define typed errors in Effect-TS using tagged errors and recover from specific failures using catchTag or catchAll. You can also convert error channels to Either or Option for safer functional error handling pipelines.

How do I set up dependency injection with Layers in Effect-TS?

Set up dependency injection in Effect-TS by defining Context.Tags, composing Layer.succeed, Layer.effect, or scoped layers, and providing dependencies at the composition root to decouple service implementations from consumers.

How do I manage concurrency and fiber lifecycle in Effect-TS?

Manage concurrency in Effect-TS by forking fibers, joining or racing outcomes, bounding parallelism with semaphores, and ensuring graceful interruption and resource cleanup using scoped finalizers.

Can I migrate my fp-ts codebase to Effect-TS patterns?

You can migrate from fp-ts to Effect-TS by refactoring existing functional TypeScript codebases to adopt Effect patterns for typed errors, dependency injection, concurrency, and safe resource management.

How do I write deterministic tests for Effect-TS streams and services?

Write deterministic tests for Effect-TS services by using TestClock for time control, providing mock Layers at the composition root, and applying Schema validation for inputs and configuration.

What is the best way to handle resource safety and finalizers in Effect-TS?

Handle resource safety in Effect-TS by applying scoped finalizers within Layer definitions, ensuring graceful interruption during fiber lifecycle management, and safely managing resources during concurrent stream processing.