effect-handbook
SKILL.md
Effect Handbook
Purpose
Use this as the single source of truth for Effect-related guidance in this repository. Sections are index buckets, not a reading order.
Routing Rules
- Do not read this handbook linearly.
- Pick one target file below.
- Follow
See alsoonly if that file is insufficient. - Read exactly one: pick one target file first; only follow
See alsoif needed. - Top-level routing: intent → exact file path; sections are index buckets, not reading order.
Quick Picks (Task -> File)
- Build a CLI command ->
sections/20-cli.md - Configure CLI options/flags ->
topics/cli-options.md - Configure CLI positional args ->
topics/cli-args.md - Build interactive CLI prompts ->
topics/cli-prompt.md - Define HTTP endpoint + handler ->
sections/30-http-server.md - Derive typed HTTP client ->
topics/http-derive-client.md - Add Swagger/OpenAPI docs ->
topics/http-swagger.md - Handle multipart upload ->
topics/http-multipart.md - Implement streaming HTTP endpoint ->
topics/http-streaming.md - Use FileSystem/Path/Url/Ndjson/Worker ->
sections/40-platform.md - NDJSON encode/decode streams ->
topics/platform-ndjson.md - Worker/WorkerRunner setup ->
topics/platform-worker.md - Run Stream into platform sink ->
topics/platform-stream-sink.md - Write Effect tests ->
sections/50-testing.md - Use @effect/vitest modes ->
topics/testing-vitest.md - Retry/repeat policy ->
topics/schedule-retry.md - Stream processing ->
topics/stream.md - Context/Layer wiring ->
topics/layer-context.md - Queue producer-consumer ->
topics/queue.md - HTTP middleware/auth ->
topics/http-middleware.md - Config/env vars ->
topics/config.md
By Domain
- Core (Effect type, composition, execution) ->
sections/00-foundations.md,sections/10-core-patterns.md - CLI (Command, Options, Args, Prompt) ->
sections/20-cli.md - HTTP (HttpApi, HttpApiBuilder, endpoints) ->
sections/30-http-server.md - Platform (FileSystem, Path, Url, Ndjson, workers) ->
sections/40-platform.md - Testing (it.effect, it.live, it.scoped, TestClock) ->
sections/50-testing.md
By Primitive
Ref/SynchronizedRef/FiberRef->topics/refs.mdCause/Exit->topics/cause-exit.mdSTM->topics/stm.mdScope/resource safety ->topics/scope-resource.mdDeferred->topics/deferred.mdSemaphore->topics/semaphore.mdCache->topics/cache.mdMatch->topics/match.mdLogger/Metric/tracing ->topics/observability.md- Concurrency/fibers/racing ->
topics/concurrency.md - Latch ->
topics/latch.md Stream(async iterables, pagination) ->topics/stream.mdSchedule(retry, repeat, backoff) ->topics/schedule-retry.mdLayer/Context(dependency injection) ->topics/layer-context.mdQueue(producer-consumer, back-pressure) ->topics/queue.mdPubSub(broadcast to subscribers) ->topics/pubsub.mdHttpApiMiddleware(auth, logging) ->topics/http-middleware.mdHttpApiClientderivation ->topics/http-derive-client.md- OpenAPI/Swagger ->
topics/http-swagger.md - Multipart ->
topics/http-multipart.md - HTTP streaming ->
topics/http-streaming.md - NDJSON ->
topics/platform-ndjson.md - Worker/WorkerRunner ->
topics/platform-worker.md - Stream + Sink integration ->
topics/platform-stream-sink.md - Vitest integration ->
topics/testing-vitest.md Config(env, typed config) ->topics/config.md
Section Index
sections/00-foundations.md— Effect type, creation, composition, run boundariessections/10-core-patterns.md— Layers, retries, refs, concurrency, streamssections/20-cli.md— Command, Options, Args, Prompt, subcommandssections/30-http-server.md— HttpApi, HttpApiEndpoint, HttpApiBuildersections/40-platform.md— FileSystem, Path, Url, Ndjson, workerssections/50-testing.md— it.effect, it.live, it.scoped, TestClock
Topic Index
topics/refs.md— Ref, SynchronizedRef, FiberReftopics/cause-exit.md— Cause, Exit, failure inspectiontopics/stm.md— STM transactions, TReftopics/scope-resource.md— Scope, acquireUseRelease, resource safetytopics/deferred.md— Deferred, one-shot signalingtopics/semaphore.md— Semaphore, bounded concurrencytopics/cache.md— Cache, TTL, lookuptopics/match.md— Match, exhaustive pattern matchingtopics/observability.md— Logger, Metric, tracingtopics/concurrency.md— Concurrency settings, fibers, racing, interruptiontopics/latch.md— Latch gating and one-way release patternstopics/stream.md— Stream creation, consumption, transformations, combiningtopics/schedule-retry.md— Retry/repeat with exponential, jittered, custom schedulestopics/layer-context.md— Context.Tag, Layer, dependency compositiontopics/queue.md— Bounded/unbounded queues, offer/take, back-pressuretopics/pubsub.md— Broadcast to multiple subscribers, subscribe/publishtopics/http-middleware.md— HttpApiMiddleware.Tag, security, providestopics/http-derive-client.md— Typed client derivation from HttpApitopics/http-swagger.md— Swagger/OpenAPI docs and annotationstopics/http-multipart.md— Multipart upload schemastopics/http-streaming.md— Streaming requests and responsestopics/platform-ndjson.md— NDJSON pack/unpack and schema channelstopics/platform-worker.md— Worker pools and WorkerRunnertopics/platform-stream-sink.md— Stream to sink/file integrationtopics/cli-options.md— Full options constructors and combinatorstopics/cli-args.md— Full args constructors and combinatorstopics/cli-prompt.md— Interactive prompts and compositiontopics/testing-vitest.md—it.effect,it.live,it.scoped,TestClocktopics/config.md— Config.string/integer, env fallback, nested config
Conventions
- Section files: What it is | When to use | When not to use | Minimal examples | Common pitfalls | See also
- Topic files: same structure, compact (~60–120 lines)
- Paths are relative to this SKILL.md; sections and topics use relative
../for cross-links
When to Use This Handbook
- Implementing Effect-based services, CLIs, HTTP APIs, or tests
- Looking up primitives (Stream, Schedule, Queue, Layer, Config)
- Resolving common pitfalls (run boundaries, retry layers, auth middleware)
- Choosing between similar primitives (Queue vs PubSub, Ref vs STM)
- Debugging Effect execution (run boundaries, fiber interruption, scoped resources)
Package References
effect— core runtime@effect/cli— Command, Options, Args, Prompt@effect/platform— HttpApi, FileSystem, Path, Url@effect/platform-node— NodeContext, NodeHttpServer, NodeRuntime@effect/vitest— it.effect, it.live, it.scoped
Weekly Installs
11
Repository
tstelzer/skillsFirst Seen
Feb 26, 2026
Security Audits
Installed on
github-copilot11
codex11
kimi-cli11
gemini-cli11
cursor11
opencode11