Strongly opinionated Effect-TS coding, refactoring, debugging, and testing guidance for TypeScript projects using the `effect` ecosystem. Use when the user is working with Effect, Effect.Schema, `Context.Tag`, `Layer`, fibers/concurrency, `Stream`/`Sink`, `@effect/vitest`, `@effect/platform`, retries/schedules, or migrating from Promise/fp-ts/ZIO-style code to idiomatic Effect. Do not use for generic English uses of the word effect unrelated to the Effect-TS library.
Use this skill for TypeScript work in the Effect ecosystem. Be strongly opinionated toward idiomatic, testable Effect code and use the bundled scripts to verify exact API/docs details from official sources.
Default to these patterns unless the user explicitly asks otherwise:
Effect.gen for sequential workflows.Context.Tag) and provide implementations via Layer.Schema at boundaries (decode/encode/validation) instead of ad hoc parsing.Data.TaggedError or domain error types) over thrown exceptions.Promise as a boundary concern only.@effect/vitest (it.effect, it.scoped, it.live, it.layer, it.prop) for tests.The bundled helper scripts are Bun-first.
command -v bun >/dev/null 2>&1 && bun --version
If Bun is missing:
references/*.md files directly.references/source-links.md.Set the wrapper path once:
export EFFECT_SKILL="/Users/timbo/workspace/personal/effect-codex/skills/effect-ts/scripts/effect.sh"
Common commands:
"$EFFECT_SKILL" cache status
"$EFFECT_SKILL" cache refresh
"$EFFECT_SKILL" docs search "TestClock"
"$EFFECT_SKILL" docs search "Effect vs Promise" --full --limit 5
"$EFFECT_SKILL" docs section --heading "Fibers" --max-lines 80
"$EFFECT_SKILL" docs section --link "https://effect.website/docs/testing/testclock/"
"$EFFECT_SKILL" api search "Stream.mapEffect" --limit 10
build, refactor, debug, test, migrate, explain, performance.build + core/services: open references/core-effect-runtime.md and references/services-context-layer.mdrefactor from async/await: open references/migration-and-comparisons.md, references/code-style-and-anti-patterns.mddebug failures/interruption: open references/errors-cause-exit.md, references/concurrency-fibers.mdtest: open references/testing.md and an examples-testing snippetschema boundary/data parsing: open references/schema.md and references/examples-schema-services.mdstreams: open references/streams-and-sinks.md and references/examples-streams.mdplatform filesystem/http/runtime: open references/platform-runtime-filesystem-http.md and references/examples-platform.mdperformance/parallelism/backpressure: open references/concurrency-fibers.md, references/streams-and-sinks.md, references/state-caching-queues-pubsub.mdreferences/advanced-ai-workflow.md or references/advanced-ecosystem.md, then verify live docs with scriptsContext.Tag service interfaces + Layer wiring for dependencies.Effect.run* at app boundaries, CLI entrypoints, or tests (not scattered through domain code).Effect.fail / typed error values over throw.Effect.try / Effect.tryPromise.Cause / Exit when debugging.Schema.decodeUnknown, Schema.parseJson, and schema transformations for inputs/outputs.JSON.parse in domain logic unless immediately wrapped and validated.@effect/vitest helpers over manually calling Effect.runPromise inside plain Vitest tests.Layer-provided test doubles/in-memory implementations.TestClock for time-dependent logic; do not wait on real time in unit tests.references/workflow-routing.md — task classification, repo inspection, first-command choicesreferences/code-style-and-anti-patterns.md — idioms and anti-patterns (strongly opinionated)references/core-effect-runtime.md — Effect<A, E, R> fundamentals and runtime entrypointsreferences/errors-cause-exit.md — failure semantics and debuggingreferences/services-context-layer.md — services, layers, dependency graphsreferences/concurrency-fibers.md — fibers, interruption, racing, coordinationreferences/resource-management-scope.md — scope/finalization and resource lifecyclesreferences/schema.md — Schema workflows, decoding, transformations, Arbitrary tie-insreferences/testing.md — @effect/vitest, TestClock, property tests, service test layersreferences/streams-and-sinks.md — stream/sink workflows and debuggingreferences/state-caching-queues-pubsub.md — state primitives, queues, pubsub, cachereferences/scheduling-and-retries.md — schedules, retries, backoff, jitterreferences/platform-runtime-filesystem-http.md — @effect/platform runtime and I/O boundariesreferences/observability.md — logs/traces/metrics guidancereferences/data-types-and-pattern-matching.md — Option/Either/Cause/etc. and Matchreferences/migration-and-comparisons.md — Promise/fp-ts/ZIO migrations and comparisonsreferences/advanced-ai-workflow.md — Effect AI/workflow docs and usage notes (volatile; verify live docs)references/advanced-ecosystem.md — niche/advanced packages (volatile; verify live docs/API)references/examples-core.mdreferences/examples-testing.mdreferences/examples-streams.mdreferences/examples-schema-services.mdreferences/examples-platform.mdreferences/index.md — master navigationreferences/source-links.md — canonical upstream links by categoryscripts/effect.shWrapper for all helper scripts. Use it instead of calling .ts files directly.
cache status — report cache freshness and file sizescache refresh [--force] — refresh upstream docs/index artifacts into local cachedocs search — search llms.txt or llms-full.txtdocs section — extract a doc section by heading regex or docs URLapi search — search the official API docs index for symbols/pagesscripts/effect-docs-search.tsUse when you need official docs discovery or keyword lookup (topics, guides, testing concepts, migration docs).
scripts/effect-docs-section.tsUse when you need to pull the exact section text context (e.g. Fibers, TestClock, schedules, schema features).
scripts/effect-api-search.tsUse when the task depends on exact API doc pages or symbol names (e.g. Fiber, Deferred, Stream.mapEffect, Layer.provide).
TestClock over real side effects/time.