effect-portable-patterns

Encapsulate promise logic in portable Effect functions resolving to plain Promises.

3.5k|155|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/millionco/expect --skill effect-portable-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-portable-patterns
Source: https://github.com/millionco/expect/tree/main/.agents/skills/effect-portable-patterns
Command: npx skills add https://github.com/millionco/expect --skill effect-portable-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect-based portable patterns address the fragility of raw promises in complex async code, providing self-contained utilities with predictable boundaries.

Core Features & Use Cases

  • Wrap promises with try-based control and tagged errors for type-safe failure handling.
  • Compose timeouts, retries, caching, and concurrency into robust flows that always resolve to a plain Promise.
  • Instrument with tracing and pattern matching to improve observability and error diagnosis.

Quick Start

Create an Effect.fn-based function and execute it at the boundary with Effect.runPromise to obtain a standard Promise.

Frequently Asked Questions about effect-portable-patterns

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

FAQPage Schema
How do I handle asynchronous errors with tagged errors in Effect?

To handle asynchronous errors with tagged errors, wrap your promise logic in Effect.tryPromise to ensure type-safe failure handling and predictable control boundaries across your data flows.

What is the best way to add timeouts and retries to async promises?

The best way to add timeouts and retries to async promises is by composing them into portable Effect functions, executing the boundary with Effect.runPromise to obtain a standard, reliable Promise.

How do I convert an Effect to a plain Promise at the boundary?

You convert an Effect to a plain Promise at the boundary by using Effect.runPromise, allowing you to execute self-contained Effect functions and integrate them seamlessly into standard async APIs and UI interactions.

Can I use Effect patterns for caching and tracing in data processing?

Yes, you can use Effect patterns for caching and tracing in data processing by composing robust flows that instrument with tracing and pattern matching to improve observability and error diagnosis.

Why do raw promises fail in complex async code and how does Effect help?

Raw promises fail in complex async code due to fragility, but Effect helps by providing self-contained utilities with predictable boundaries, encapsulating promise logic in portable functions that resolve to a plain Promise.

Do I need any external dependencies to use portable Effect patterns?

No external dependencies are required to use portable Effect patterns, as they are self-contained utilities designed to wrap promise logic with strict use of Effect.tryPromise and boundary execution.