Effect
Collection of agent skills I use in day to day work spanning engineering and none engineering work.
npx -y skills add endalk200/skills --skill effectAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Opinionated guide for building production TypeScript applications with Effect v4. Use when implementing Effect workflows, services, layers, schemas, configuration, schedules, caches, streams, HTTP clients, Effect Atom or API-backed frontend state, or tests.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.6 KB, as published. Nobody here has run it
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.
Source Rule
Check these before guessing:
- the nearest
AGENTS.mdand any project-local Effect practices doc - the project-pinned
effectpackage source and version - current upstream Effect source when the installed package does not answer the question
Branch Chooser
Read only the branch references that match the task.
- Data models, schemas, brands, variants, optional keys, or decoders: read
references/SCHEMA.md. - Services, module surfaces, layers, runtime wiring, errors,
Effect.fn, or test services: readreferences/SERVICES_LAYERS.md. - Runtime config, env variables,
ConfigProvider, orlayerConfig: readreferences/CONFIG.md. - Retry, repeat, polling, backoff, jitter, rate-limit-aware policies, or pass loops: read
references/SCHEDULING.md. - Memoization, per-key TTL caches, deduplicating concurrent lookups, or request batching: read
references/CACHING.md. - Streams, event sources, async iterables, queues/pubsubs, pagination, backpressure, or stream consumers: read
references/STREAMS.md. - Effect Atom,
@effect-atom, API-backed UI, server state, frontend queries or mutations, derived/effectful atoms, atom actions, atom runtimes, reactivity keys, optimistic updates, or stream-backed UI state: readreferences/EFFECT_ATOM.md. - Outgoing HTTP calls, Effect HttpClient, status handling, or HTTP rate limiting: read
references/HTTP_CLIENTS.md. - Effect tests, time, sleeps, concurrency synchronization, or fakes: read
references/TESTING.md.
If a task spans several branches, read all matching files before editing.
Core Defaults
- Compose workflows with
Effect.gen(function* () { ... }). - Define public service methods and non-trivial internal service methods with
Effect.fn("Domain.operation"). - Use
Effect.fnUntracedonly for internal helpers where stack-frame/span metadata is intentionally unnecessary. - Prefer
Context.Servicefor application services when the codebase has not standardized on another current service-tag style. - Build real service implementations with
Layer.effect(Service, Effect.gen(...))and returnService.of({ ... }). - Choose
Schema.Struct,Schema.Opaque, orSchema.Classfrom the decoded value's runtime semantics; useSchema.asClassonly to attach static helpers to an existing schema. - Model typed Effect errors with
Schema.TaggedErrorClass. - Read runtime config through
Config, not directprocess.envaccess in application logic. - Use
Schedulefor retry, repeat, polling, pacing, and backoff policies. - Use
Streamfor effectful sources that emit many values over time and need pull, backpressure, interruption, or transformation. - Prefer Effect HTTP client modules for outgoing HTTP in Effect applications when their typed errors, layers, and client transforms are useful.
- Prefer Effect-aware tests, explicit layers, and deterministic synchronization over sleeps.
- Prefer decoders and
schema.makeEffect(...)at untrusted boundaries; reserve throwingschema.make(...)for trusted construction, and never use casts to skip validation.
Quick Selection Guide
- Plain structural object:
Schema.Struct(...)plus a same-nameinterface. - Named structural object with the same plain-object runtime representation:
Schema.Opaque<Self>()(Schema.Struct(...)). - Prototype-backed domain object with instance behavior:
Schema.Class<Self>("Identifier")(...); add a nominal brand when structural substitution would be unsafe. - Existing schema that only needs co-located static helpers:
Schema.asClass(schema). - Scalar ID/value object: constrained branded schema.
- Internal workflow decision or state:
Data.TaggedEnum<...>plusData.taggedEnum<...>()constructors and exhaustive$match. - Reusable boundary-crossing tagged variant:
Schema.TaggedStruct(...)plus same-nameinterface. - Boundary-crossing tagged union:
Schema.TaggedUnion(...)with.cases,.guards, and.match. - External/custom discriminator such as
type:Schema.Struct({ type: Schema.tag("variant"), ... })plusSchema.toTaggedUnion("type")when union helpers are needed. - Expected typed failure:
Schema.TaggedErrorClass. - Unknown boundary payload:
Schema.decodeUnknownEffect(...). - Service boundary:
Context.Service<Service, Interface>()(...)plusLayer.effect(...)plusService.of(...). - Public or non-trivial internal service method:
Effect.fn("Domain.operation"). - Runtime configuration:
Configrecipes read in layers; override withConfigProviderin tests. - Event source:
Streamconsumed withStream.runForEach(...)and forked withEffect.forkScopedin the owning layer. - Queue-backed event source:
Queuefor the producer boundary,Stream.fromQueue(...)for consumers. - Broadcast event source:
PubSub/Stream.fromPubSub(...)orSubscriptionReffor latest-value state. - Polling worker:
runPass().pipe(Effect.repeat(Schedule.spaced(...))), with typed pass failures handled before repeat. - Retry transient operation:
Effect.retry(...)/Effect.retryOrElse(...)with a boundedSchedule. - Keyed lookup cache with TTL and concurrent-lookup dedupe: prefer
Cache.make(...)/ exit-awareCache.makeWith(...)when their lifecycle and eviction model fit. - Memoize a single effect result:
Effect.cached(...)/Effect.cachedWithTTL(...). - Batch N keys into one backend call (only when a real batch endpoint exists):
Effect.request(...)+RequestResolver. - HTTP request in an Effect application: prefer Effect
HttpClientplus request/response schema decoding. - HTTP transient retry:
HttpClient.retryTransient(...). - Time-sensitive test:
TestClock, not real sleeping. - Concurrent/background test synchronization:
Deferred,Queue,Latch,Ref, or explicit test hooks.
Boundary Rules
- Keep HTTP handlers thin: decode input, read context, call services, map typed errors to transport responses.
- Keep business rules in services or domain functions, not transport handlers.
- Wrap HTTP clients, SDKs, CLIs, and external integrations in named effects at adapter boundaries.
- Decode persisted rows with Schema or SQL-specific helpers when values are not trivially trusted.
- Keep provider/network calls outside authoritative database transactions.
- Catch or retry only when the current boundary has a truthful response.
- Retry only when the operation has proven idempotency.
- Let exhausted failures remain visible unless the boundary has a real fallback.
Do Nots
- Do not use
as any, non-null assertions, or unchecked casts to silence Effect typing problems. - Do not hand-roll
_tagerror classes whenSchema.TaggedErrorClassfits. - Do not use cause-level recovery when typed-error recovery is enough.
- Do not use
Layer.mergeAll(...)orprovideMerge(...)as blind make-it-compile tools. - Do not hide required application authority, credentials, persistence, transports, or external services behind
Context.Referencedefaults. - Do not add arbitrary
Effect.sleep(...)to tests when a deterministic synchronization primitive is available. - Do not hand-roll Map/TTL/prune caches or in-flight dedupe when
effect/Cachefits.