agentleFS
timmo001timmo001/notes/.agents/skills/effect/SKILL.md

effect

Skill2 starsChanged 20 days agoApache-2.0View on GitHub

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.

  • Reads credentials

We split this skill into the rules it gives an agent

23 rules. 2 are common, 8 are distinctive, and 13 are very specific to this project.

  • 2

    Common

    Most of the 10 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use current Effect v4 APIs and the production defaults in this skill.

    line 11
  2. Very specific:

    Read references/V4_APIS.md when upgrading from v3 or a v4 prerelease.

    line 17
  3. Distinctive:

    Check these before guessing:

    line 20
  4. Distinctive:

    Read only the branch references that match the task.

    line 28
  5. Distinctive:

    If a task spans several branches, read all matching files before editing.

    line 39
  6. Very specific:

    Use Effect.fnUntraced only for internal helpers where stack-frame/span metadata is intentionally unnecessary.

    line 45
  7. Very specific:

    Prefer Context.Service for application services when the codebase has not standardized on another current service-tag style.

    line 46
  8. Very specific:

    Read runtime config through Config, not direct process.env access in application logic.

    line 50
  9. Very specific:

    Use Schedule for retry, repeat, polling, pacing, and backoff policies.

    line 51
  10. Very specific:

    Use Stream for effectful sources that emit many values over time and need pull, backpressure, interruption, or transformation.

    line 52
  11. Distinctive:

    Prefer Effect HTTP client modules for outgoing HTTP in Effect applications when their typed errors, layers, and client transforms are …

    line 53
  12. Distinctive:

    Prefer Effect-aware tests, explicit layers, and deterministic synchronization over sleeps.

    line 54
  13. Common:

    Keep HTTP handlers thin: decode input, read context, call services, map typed errors to transport responses.

    line 85
  14. Distinctive:

    Keep business rules in services or domain functions, not transport handlers.

    line 86
  15. Common:

    Keep provider/network calls outside authoritative database transactions.

    line 89
  16. Very specific:

    Do not use as any, non-null assertions, or unchecked casts to silence Effect typing problems.

    line 96
  17. Very specific:

    Do not introduce Schema.Class or Schema.TaggedClass as default app data-modeling patterns.

    line 97
  18. Very specific:

    Do not hand-roll _tag error classes when Schema.TaggedError fits.

    line 98
  19. Distinctive:

    Do not use cause-level recovery when typed-error recovery is enough.

    line 99
  20. Very specific:

    Do not use Layer.mergeAll(...) or provideMerge(...) as blind make-it-compile tools.

    line 100
  21. Very specific:

    Do not hide required application authority, credentials, persistence, transports, or external services behind Context.Reference defaults.

    line 101
  22. Very specific:

    Do not add arbitrary Effect.sleep(...) to tests when a deterministic synchronization primitive is available.

    line 102
  23. Very specific:

    Do not hand-roll Map/TTL/prune caches or in-flight dedupe when effect/Cache fits.

    line 103

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Reviewed against Effect 4.0.0, upstream commit 6389d9ac6. Read references/V4_APIS.md when upgrading from v3 or a v4 prerelease. The installed version takes precedence: prerelease APIs and import paths can differ.

Check these before guessing:

  • the nearest AGENTS.md and any project-local Effect practices doc
  • the project-pinned effect package 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: read references/SERVICES_LAYERS.md.
  • Runtime config, env variables, ConfigProvider, or layerConfig: read references/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.
  • 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.fnUntraced only for internal helpers where stack-frame/span metadata is intentionally unnecessary.
  • Prefer Context.Service for 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 return Service.of({ ... }).
  • Model records with Schema.Struct(...) plus a same-name interface.
  • Model typed Effect errors with Schema.TaggedError.
  • Read runtime config through Config, not direct process.env access in application logic.
  • Use Schedule for retry, repeat, polling, pacing, and backoff policies.
  • Use Stream for 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.
  • Decode unknown wire input with Schema.decodeUnknownEffect(...); use schema.makeEffect(...) for typed constructor input with validation. Reserve throwing schema.make(...) for trusted construction, and never use casts to skip validation.

Quick Selection Guide

  • Ordinary object record: Schema.Struct(...) plus same-name interface.
  • Scalar ID/value object: constrained branded schema.
  • Internal workflow decision or state: Data.TaggedEnum<...> plus Data.taggedEnum<...>() constructors and exhaustive $match.
  • Reusable boundary-crossing tagged variant: Schema.TaggedStruct(...) plus same-name interface.
  • Boundary-crossing tagged union: Schema.TaggedUnion(...) with .cases, .guards, and .match.
  • External/custom discriminator such as type: Schema.Struct({ type: Schema.tag("variant"), ... }) plus Schema.toTaggedUnion("type") when union helpers are needed.
  • Expected typed failure: Schema.TaggedError.
  • Unknown boundary payload: Schema.decodeUnknownEffect(...).
  • Service boundary: Context.Service<Service, Interface>()(...) plus Layer.effect(...) plus Service.of(...).
  • Public or non-trivial internal service method: Effect.fn("Domain.operation").
  • Runtime configuration: Config recipes read in layers; override with ConfigProvider in tests.
  • Event source: Stream consumed with Stream.runForEach(...) and forked with Effect.forkScoped in the owning layer.
  • Queue-backed event source: Queue for the producer boundary, Stream.fromQueue(...) for consumers.
  • Broadcast event source: PubSub / Stream.fromPubSub(...) or SubscriptionRef for 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 bounded Schedule.
  • Keyed lookup cache with TTL and concurrent-lookup dedupe: prefer Cache.make(...) / exit-aware Cache.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 HttpClient plus 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 introduce Schema.Class or Schema.TaggedClass as default app data-modeling patterns.
  • Do not hand-roll _tag error classes when Schema.TaggedError fits.
  • Do not use cause-level recovery when typed-error recovery is enough.
  • Do not use Layer.mergeAll(...) or provideMerge(...) as blind make-it-compile tools.
  • Do not hide required application authority, credentials, persistence, transports, or external services behind Context.Reference defaults.
  • 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/Cache fits.

Download now (ZIP)

Trending

Surging: 3 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 1 new projectWeek of Oct 4: 1 new projectWeek of Oct 11: 1 new projectWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 3 in all, so this is a hint, not a trend.
  • Other versions13 projects use a version of this.

    Word for word · 3

    1. supabase/cli★ 2.4k100% same
    2. kitlangton/skills★ 326100% same
    3. timmo001/context★ 1100% same

    Edited · 6

    1. rjdellecese/confect★ 37497% same
    2. mezotv/notra★ 25698% same
    3. usenotra/notra★ 25698% same
    4. getsentry/skillet★ 1397% same
    5. itsyasirkhandev/skills★ 491% same
    6. endalk200/skills★ 131% same

    Wrote their own version · 4

    1. XiaomiMiMo/MiMo-Code★ 14ksame name
    2. akitaonrails/my-skills★ 283same name
    3. jpoehnelt/skills★ 23same name
    4. pengelbrecht/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use humanizer, vercel-react-best-practices and 1 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • Microsoft AzureSkill

      humanizer

      Tone enforcement patterns for external-facing community responses

      Also in 3 projects that use this

    • VercelSkill

      vercel-react-best-practices

      React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

      Also in 3 projects that use this

    • GoogleSkill

      grill-me

      A relentless interview to sharpen a plan or design.

      Also in 3 projects that use this

  • In this repository15 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.