effect-handbook
9
总安装量
9
周安装量
#32236
全站排名
安装命令
npx skills add https://github.com/tstelzer/skills --skill effect-handbook
Agent 安装分布
amp
9
github-copilot
9
codex
9
kimi-cli
9
gemini-cli
9
cursor
9
Skill 文档
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