Effect Dependency Injection

•
72
•

Manages complex dependency graphs and service lifecycles in Effect-based TypeScript applications using type-safe Context and Layers.

This skill empowers Claude to architect robust, testable TypeScript applications by mastering the Effect library's dependency injection system. It provides comprehensive patterns for defining service interfaces with type-safe Tags, constructing modular Layers for service implementations, and composing sophisticated dependency graphs using pipelines and merging. From managing database connections with automatic cleanup via scoped layers to implementing the repository and facade patterns for clean architecture, this skill ensures scalable and maintainable dependency management throughout the application lifecycle.

主な機能

01Type-safe service definitions using Context and GenericTag
0272 GitHub stars
03Automatic resource management and finalizers for service cleanup
04Modular layer construction with succeed, effect, and scoped variants
05Advanced dependency composition using layer merging and pipelines
06Streamlined testing patterns through mock and in-memory layer overrides

ユースケース

01Architecting large-scale TypeScript backends using clean architecture principles
02Configuring multi-environment applications with environment-specific service layers
03Decoupling business logic from infrastructure using the Repository and Facade patterns