effect

Applies Effect 4.0 framework conventions to Bun-based TypeScript services.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/leonardoacosta/skills --skill effect-leonardoacosta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect
Source: https://github.com/leonardoacosta/skills/tree/main/bun-effect-kit/skills/effect
Command: npx skills add https://github.com/leonardoacosta/skills --skill effect-leonardoacosta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Structuring Bun-based TypeScript services with Effect requires consistent patterns for error handling, dependency injection, and resource cleanup, and ad-hoc implementations lead to untyped failures and tangled interop code. ## Core Features & Use Cases - Typed Error Modeling: Guides modeling expected failures as typed errors instead of unchecked exceptions. - Layer-Based Dependencies: Directs building dependencies as explicit layers provided at the application boundary. - Scoped Resource Management: Ensures connections, handles, and subscriptions use scoped resources with proper cleanup. - Use Case: When building a Bun service that composes Drizzle database access with Effect, use this Skill to structure layers, isolate promise and request-framework interop at adapter boundaries, and verify with bun typecheck. ## Quick Start Apply the effect skill to review my Bun service and refactor its error handling and dependency injection to follow Effect 4.0 conventions.

Frequently Asked Questions about effect

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

FAQPage Schema
How do I structure error handling in an Effect TypeScript service?

Model expected failures as typed errors rather than unchecked exceptions so callers can handle them exhaustively. This makes failure cases part of the function signature and keeps error paths explicit across the service.

How do I manage dependencies with Effect layers in Bun?

Build dependencies as explicit layers and provide them at the application boundary. This keeps service composition declarative and lets the runtime wire database, configuration, and external clients without hidden globals.

Can I use Effect with promise-based or callback APIs?

Yes, but keep promise, callback, and request-framework interop at narrow adapter boundaries. Isolate the conversion code so the core application logic stays purely within Effect's model.

How do I clean up connections and subscriptions in Effect?

Use scoped resources for connections, handles, and subscriptions that require cleanup. Effect guarantees finalizers run when the scope closes, preventing leaked resources even on failure paths.

What verification steps should run before committing Effect service code?

Run the repository's formatter and linter first, then bun typecheck and the focused tests. This ordering catches style issues before type errors and confirms the service compiles under Bun's toolchain.