effect-ts

Guide idiomatic Effect-TS patterns for typed errors, dependency injection, and service composition.

8|Updated Mar 28, 2024
One-click install
npx skills add https://github.com/joncrangle/.dotfiles --skill effect-ts-joncrangle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-ts
Source: https://github.com/joncrangle/.dotfiles/tree/main/dot_config/opencode/skills/effect-ts
Command: npx skills add https://github.com/joncrangle/.dotfiles --skill effect-ts-joncrangle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

In TypeScript projects, teams struggle to apply consistent, idiomatic usage of Effect-TS for error handling, dependency management, and service composition.

Core Features & Use Cases

  • Guidance on implementing typed errors, Layer-based dependency injection, and composable Effects with Effect-TS.
  • Best practices for error taxonomy, resource management, and testing patterns in Effect-powered architectures.
  • Real-world scenarios including Next.js integration and server/client boundaries.

Quick Start

Begin by mapping existing error handling and DI patterns to Effect-TS primitives and implement a small example using Effects.gen to validate the approach.

Frequently Asked Questions about effect-ts

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

FAQPage Schema
How do I handle typed errors and dependency injection in Effect-TS?

Effect-TS handles typed errors and dependency injection through Layer-based service composition. You define structured error taxonomies and manage resources using composable Effects to build robust TypeScript architectures.

What is the best way to integrate Effect-TS with Next.js?

Integrating Effect-TS with Next.js involves applying idiomatic patterns across server and client boundaries. You map existing dependency injection and error handling to Effect primitives to maintain structured execution within the framework.

How do I test Effect-TS services and Layers in TypeScript?

Testing Effect-TS services involves validating behavior through composable Effects and Layers. You enforce typed errors and documented conventions to verify dependency injection and structured service composition during tests.

Can I use functional programming patterns for resource management in Effect-TS?

Resource management in Effect-TS uses functional programming patterns to ensure structured cleanup and safe composition. You can safely manage lifecycles by enforcing typed errors and documented rules for composing effects.

When should I map existing TypeScript patterns to Effect-TS primitives?

Map existing TypeScript patterns to Effect-TS primitives when you need consistent error handling and dependency management. Starting with a small example using Effects.gen validates the approach before broader architectural adoption.