effect-ts

Guides Effect TypeScript development with typed errors, services, layers, and testing patterns.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/celeroncoder/skills --skill effect-ts-celeroncoder
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: effect-ts
Source: https://github.com/celeroncoder/skills/tree/main/effect-ts
Command: npx skills add https://github.com/celeroncoder/skills --skill effect-ts-celeroncoder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing idiomatic Effect code requires navigating a large API surface, choosing between many equivalent patterns, and keeping error handling, dependency injection, and testing consistent. This Skill provides curated guidance, vendored source references, and opinionated conventions so Effect work in a repository follows canonical patterns instead of ad hoc solutions. ## Core Features & Use Cases - Pattern Guidance: Enforces canonical Effect patterns such as Effect.fn for business logic, Effect.gen for workflows, Schema.TaggedErrorClass for typed errors, and Context.Service with Layer for dependency injection. - Research Workflow: Directs the agent to local reference guides first, then codebase patterns, then the vendored Effect source for exact API details and behavior verification. - Package & Version Rules: Specifies installation rules such as effect@beta, aligned @effect/* package versions, and runtime-specific platform packages. - Use Case: When adding a new service with database access and retries to an Effect-based project, the Skill guides layer composition, typed error definitions, retry schedules, and @effect/vitest testing following the repository's conventions. ## Quick Start Ask the agent to implement a new Effect service with typed errors and a layer, and have it follow the Effect patterns in this repository.

Frequently Asked Questions about effect-ts

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

FAQPage Schema
How do I define typed errors in Effect TypeScript?▼

Define typed errors with Schema.TaggedErrorClass when the error payload is schema-friendly, giving you yieldable tagged errors with encode/decode support. Use Data.TaggedError only for non-serializable or in-memory-only payloads, and recover with Effect.catchTag or Effect.catchTags.

How do I structure services and layers in Effect?▼

Define services with Context.Service using class syntax, then build implementations with Layer.succeed for pure values or Layer.effect for effectful construction. Compose with Layer.mergeAll and Layer.provide, and call Effect.provide only once at the application entrypoint.

Should I use Effect.fn or Effect.gen for business logic?▼

Use Effect.fn for reusable effectful functions, including ones without arguments, and Effect.gen for inline workflow orchestration with multiple yield steps. Avoid Effect.fnUntraced except for measured low-level hot paths.

Which Effect packages should I install for Node.js?▼

Install effect@beta as the core library and add @effect/platform-node for Node.js runtime needs. Keep all @effect/* packages on aligned versions and only add packages like @effect/vitest or @effect/opentelemetry when the task requires them.

When should I use Data.TaggedError instead of Schema.TaggedErrorClass?▼

Use Data.TaggedError when the error payload is not meaningfully serializable or cannot reasonably be modeled as a schema, such as ad hoc in-memory-only errors. Prefer Schema.TaggedErrorClass whenever the error crosses protocol, persistence, or transport boundaries.