Effect

Structure async TypeScript workflows with typed effects, dependencies, and resource lifecycles.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/nhattran998/crossfire --skill effect-nhattran998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Effect
Source: https://github.com/nhattran998/crossfire/tree/main/.agents/skills/effect
Command: npx skills add https://github.com/nhattran998/crossfire --skill effect-nhattran998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect helps you manage asynchronous logic, typed failures, dependencies, and resource lifecycles in a composable way, reducing fragile promise chains and ad-hoc error handling.

Core Features & Use Cases

  • Composable effect pipelines: Build programs from small units using map, flatMap (chain), zip/all, and structured error recovery.
  • Typed errors and safe error handling: Model failure cases explicitly and transform or recover from errors predictably.
  • Context-driven dependency injection: Declare required services in the effect environment and provide them via Layer and Context tags.
  • Resource lifecycle management: Acquire and release resources safely using acquireRelease and related scoped patterns.

Quick Start

Ask for Effect framework (3.19.x) patterns to implement dependency-injected, resource-safe, typed-error workflows in TypeScript.

Frequently Asked Questions about Effect

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

FAQPage Schema
How do I handle typed errors in TypeScript async workflows without using fragile promise chains?

Typed errors in TypeScript async workflows can be handled by structuring logic as typed effects with explicit success and failure cases, using combinators like catch and catchAll to recover from failures predictably instead of relying on fragile promise chains.

What is the best way to manage dependency injection and service context in TypeScript functional programming?

Dependency injection in TypeScript functional programming is managed by declaring required services in an effect environment and providing them via Layer-based provisioning and Context tags, satisfying environment dependencies without manual parameter threading.

How do I safely acquire and release resources with scoped lifetimes in TypeScript?

Resource lifecycles in TypeScript are safely managed using acquireRelease and scoped lifetime patterns, ensuring resources are acquired and released predictably within structured effect pipelines.

Does the Effect framework support composing async TypeScript pipelines with map and flatMap?

The Effect framework supports building composable async TypeScript pipelines by chaining small units using combinators like map, flatMap, zip, and all, replacing ad-hoc error handling with structured effect composition.

Why should I model failure cases explicitly as typed errors instead of using standard try-catch blocks?

Modeling failure cases explicitly as typed errors allows you to transform and recover from errors predictably within the type system, avoiding uncaught exceptions and reducing ad-hoc error handling logic.

When do I need Layer composition for resource management in TypeScript backend services?

Layer composition is needed for TypeScript backend service logic when provisioning dependencies and managing scoped resource lifetimes, allowing you to satisfy context requirements without manually passing service parameters through functions.