effect-wrapping

Wrap Promise-based APIs for use within the Effect ecosystem.

5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/agentxm/axm --skill effect-wrapping
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-wrapping
Source: https://github.com/agentxm/axm/tree/main/.axm/extensions/%40axm/skills/effect-wrapping/src
Command: npx skills add https://github.com/agentxm/axm --skill effect-wrapping

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Seamlessly integrate Promise-based libraries into the Effect ecosystem by providing safe wrappers and typed errors that preserve usability and safety.

Core Features & Use Cases

  • Provides a pattern to wrap third-party libraries so their Promise-based APIs can be used with Effect
  • Includes guidance for creating dedicated wrappers that preserve API surfaces
  • Use Case: Integrate a logging library that exposes Promise-based APIs into an Effect workflow

Quick Start

Install the effect-wrapping package and import the wrapper module to start wrapping a Promise-based library.

Frequently Asked Questions about effect-wrapping

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

FAQPage Schema
How do I wrap Promise-based APIs to use them with Effect?

To wrap Promise-based APIs for Effect, you apply a pattern that provides type-safe wrappers and typed errors. This preserves the original function signatures while integrating third-party libraries into the Effect ecosystem.

What is the best way to integrate a third-party logging library with Effect workflows?

Integrating a Promise-based logging library with Effect workflows involves creating a dedicated wrapper. This wrapper applies Effect conventions to the library's API surface, ensuring seamless and safe usage within your Effect code.

Do I need to rewrite function signatures when wrapping Promise-returning code for Effect?

No, you do not need to rewrite function signatures. The wrapping pattern preserves the original API surfaces of your Promise-returning code, applying type-safe wrappers that re-export a clean public API for Effect.

Can I use this wrapping pattern for any TypeScript project that returns Promises?

Yes, you can apply this wrapping pattern to any Promise-returning code across TypeScript projects. It is designed to integrate third-party libraries or custom Promise-based code with the Effect ecosystem safely.

Why does wrapping Promise-based libraries require dedicated typed errors for Effect?

Wrapping Promise-based libraries requires dedicated typed errors to preserve usability and safety within the Effect ecosystem. Typed errors ensure that failures from the original Promise APIs are handled predictably in Effect workflows.