OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add kitlangton/skills --skill effect
Opinionated guide for building production TypeScript applications with Effect v4. Use when implementing Effect workflows, services, layers, schemas, configuration, schedules, caches, streams, HTTP clients, or tests.
npx skills add kitlangton/skills --skill effect
Use current Effect v4 APIs and the production defaults in this skill. Established project conventions still take precedence unless the task is explicitly changing them.
Check these before guessing:
AGENTS.md and any project-local Effect practices doceffect package source and versionRead only the branch references that match the task.
references/SCHEMA.md.Effect.fn, or test services: read references/SERVICES_LAYERS.md.ConfigProvider, or layerConfig: read references/CONFIG.md.references/SCHEDULING.md.references/CACHING.md.references/STREAMS.md.references/HTTP_CLIENTS.md.references/TESTING.md.If a task spans several branches, read all matching files before editing.
Effect.gen(function* () { ... }).Effect.fn("Domain.operation").Effect.fnUntraced only for internal helpers where stack-frame/span metadata is intentionally unnecessary.Context.Service for application services when the codebase has not standardized on another current service-tag style.Layer.effect(Service, Effect.gen(...)) and return Service.of({ ... }).Schema.Struct(...) plus a same-name interface.Schema.TaggedError.Config, not direct process.env access in application logic.Schedule for retry, repeat, polling, pacing, and backoff policies.Stream for effectful sources that emit many values over time and need pull, backpressure, interruption, or transformation.schema.makeEffect(...) at untrusted boundaries; reserve throwing schema.make(...) for trusted construction, and never use casts to skip validation.Schema.Struct(...) plus same-name interface.Data.TaggedEnum<...> plus Data.taggedEnum<...>() constructors and exhaustive $match.Schema.TaggedStruct(...) plus same-name interface.Schema.TaggedUnion(...) with .cases, .guards, and .match.type: Schema.Struct({ type: Schema.tag("variant"), ... }) plus Schema.toTaggedUnion("type") when union helpers are needed.Schema.TaggedError.Schema.decodeUnknownEffect(...).Context.Service<Service, Interface>()(...) plus Layer.effect(...) plus Service.of(...).Effect.fn("Domain.operation").Config recipes read in layers; override with ConfigProvider in tests.Stream consumed with Stream.runForEach(...) and forked with Effect.forkScoped in the owning layer.Queue for the producer boundary, Stream.fromQueue(...) for consumers.PubSub / Stream.fromPubSub(...) or SubscriptionRef for latest-value state.runPass().pipe(Effect.repeat(Schedule.spaced(...))), with typed pass failures handled before repeat.Effect.retry(...) / Effect.retryOrElse(...) with a bounded Schedule.Cache.make(...) / exit-aware Cache.makeWith(...) when their lifecycle and eviction model fit.Effect.cached(...) / Effect.cachedWithTTL(...).Effect.request(...) + RequestResolver.HttpClient plus request/response schema decoding.HttpClient.retryTransient(...).TestClock, not real sleeping.Deferred, Queue, Latch, Ref, or explicit test hooks.as any, non-null assertions, or unchecked casts to silence Effect typing problems.Schema.Class or Schema.TaggedClass as default app data-modeling patterns._tag error classes when Schema.TaggedError fits.Layer.mergeAll(...) or provideMerge(...) as blind make-it-compile tools.Context.Reference defaults.Effect.sleep(...) to tests when a deterministic synchronization primitive is available.effect/Cache fits.