Use when building, reviewing, debugging, or migrating Effect TypeScript code and needing idiomatic implementation guidance backed by current official docs. Trigger for Effect, effect/Schema, Effect.gen, pipe, Runtime, ManagedRuntime, Layer, Context.Tag, Config, Scope, Schedule, Stream, Sink, Queue, PubSub, Fiber, Cause, Exit, Option, Either, Effect AI, @effect/platform, Micro, or TypeScript imports from the `effect` ecosystem.
Use when building, reviewing, debugging, or migrating Effect TypeScript code and needing idiomatic implementation guidance backed by current official docs. Trigger for Effect, effect/Schema, Effect.gen, pipe, Runtime, ManagedRuntime, Layer, Context.Tag, Config, Scope, Schedule, Stream, Sink, Queue, PubSub, Fiber, Cause, Exit, Option, Either, Effect AI, @effect/platform, Micro, or TypeScript imports from the `effect` ecosystem.
Effect TypeScript Docs
Use this skill to produce idiomatic Effect TypeScript implementation guidance while verifying current API details against official docs and the installed project version.
Operating Model
Keep this model in mind before choosing patterns:
Effect.Effect<A, E, R>
A: success value.
E: expected, recoverable failure type.
R: required services that must be provided before execution.
Effects are lazy descriptions. They run only when a runtime executes them.
Run effects at program edges: HTTP handlers, CLIs, workers, tests, scheduled jobs.
Use typed failures for domain outcomes and defects for bugs or impossible states.
Prefer Effect.gen for sequential business logic and pipe for short transforms.
Workflow
Identify the task: explain, design, migrate Promise code, fix a type error, implement a feature, review Effect code, or evaluate adoption.
Inspect local context before editing: package.json, lockfile, installed effect version when available, TypeScript config, imports, nearby style, and tests.
Load the smallest relevant reference file from the map below for idioms and tradeoffs.
For architecture, migration, adoption, or boundary-design questions, inspect one or two matching files under examples/ before prescribing a pattern. Treat them as real-world pattern checks, not API authority.
Use references/doc-map.md to choose official docs when the right page is not obvious.
Fetch the current official page from https://effect.website/docs/... before making precise claims about APIs, signatures, examples, or recommended patterns.
Use the API list or installed package exports when exact functions, methods, overloads, or module members matter.
Make changes in the project's existing style. Match import style, package manager, test framework, Effect version, and boundary conventions.
Verify with the narrowest meaningful local command first: typecheck, targeted tests, affected build, or package-specific checks.
Quick Decisions
Sequential effectful workflow: use Effect.gen.
Short transformation or recovery chain: use pipe.
Domain error with fields: use a tagged error pattern, then recover by tag.
Thrown sync/Promise API: wrap it and map thrown values into typed failures.
HTTP, CLI, queue, or worker boundary: provide services and run once at the edge.
Reused app services such as DB pools or telemetry: build layers/runtime once, not per operation.
Need all parallel results: use structured concurrency helpers with explicit concurrency.
Need first winner or cancellation signal: race deliberately and confirm loser interruption semantics.
Resource with acquire/release: use scoped resource management.
Boundary validation or wire encoding: use Schema; verify exact constructors and decode/encode helpers in docs.
Only need typed errors or only need validation: consider lighter alternatives before expanding Effect across the codebase.
Navigation Heuristics
New projects, imports, creating/running effects, generator syntax, pipelines, and control flow: start with Getting Started.
Error modeling, recovery, defects, accumulation, retry, timeout, sandboxing, Cause, Exit, Either, or yieldable errors: start with Error Management and Data Types.
Dependency injection, services, Context, Layer, default services, configuration, runtime provisioning, or app bootstrapping: start with Requirements Management, Configuration, and Runtime.
Resource safety, acquisition/release, finalizers, or scoped lifetimes: start with Resource Management and Scope.
Concurrency, interruption, racing, Fiber, Queue, PubSub, Deferred, Latch, or Semaphore: start with Concurrency.
Validation, parsing, encoding, transformations, JSON Schema, branded schemas, class APIs, or pretty/error formatting: start with Schema.
Streaming pipelines, stream creation/consumption, stream errors, leftovers, or Sink: start with Stream and Sink.
Caching, batching, schedules, cron, repetition, retries, or polling: start with Caching, Batching, and Scheduling.
Files, paths, commands, terminal IO, key-value storage, or cross-platform runtime APIs: start with Platform.
Logging, metrics, tracing, or supervision: start with Observability.
Comparisons, migration, or evaluating adoption: start with Additional Resources.
Example Selection
Use the examples/ files when the question is less about a single API and more about how Effect fits into a real codebase:
Production CLI/backend with many external systems: read examples/example-anomalyco-opencode.md.
Local-first sync, browser/worker channels, RPC, or reconnect loops: read examples/example-livestorejs-livestore.md.
Incremental adoption inside a mostly conventional TypeScript app: read examples/example-triggerdotdev-trigger.dev.md.