agentleFS
SentryKnown publishergetsentry/skillet/examples/effect/SKILL.md

effect

Skill13 starsChanged 7 months agoMITView on GitHub

Guides production TypeScript work with current Effect APIs and explicit Effect architecture; use when implementing, reviewing, debugging, or refactoring Effect schemas, services, layers, config, schedules, caches, streams, HTTP clients, or tests, but not for non-Effect TypeScript or an explicitly older API surface.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use humanizer, vercel-react-best-practices and 2 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

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 1 is common, 15 are distinctive, and 4 are very specific to this project.

  • 1

    Common

    Most of the 14 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read only the references needed for the task, and combine them when concerns overlap:

    line 13
  2. Very specific:

    Use Schema.Struct(...) for application records.

    line 26
  3. Distinctive:

    Use brands for scalar IDs and constrained values.

    line 27
  4. Distinctive:

    Use tagged Schema variants and unions for values that cross boundaries.

    line 28
  5. Distinctive:

    Never use casts or throwing construction to skip validation at untrusted boundaries.

    line 31
  6. Distinctive:

    Keep business rules in named workflows and services.

    line 35
  7. Distinctive:

    Keep HTTP and transport handlers focused on decoding, context, invocation, and response mapping.

    line 38
  8. Distinctive:

    Do not hide required authority, credentials, persistence, or transports behind defaults.

    line 40
  9. Very specific:

    Use Config for runtime configuration and override it with providers in tests.

    line 44
  10. Very specific:

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

    line 45
  11. Very specific:

    Use Cache or Effect memoization when their ownership and eviction model fit.

    line 46
  12. Distinctive:

    Use request batching only when the backend exposes a real batch operation.

    line 47
  13. Distinctive:

    Use Queue, PubSub, SubscriptionRef, and Stream according to producer, consumer, broadcast, and backpressure needs.

    line 48
  14. Distinctive:

    Keep long-lived fibers scoped to the layer or resource that owns them.

    line 49
  15. Distinctive:

    Keep exhausted failures visible unless the boundary has a real fallback.

    line 57
  16. Common:

    Keep provider and network calls outside authoritative database transactions.

    line 58
  17. Distinctive:

    Use Effect-aware tests and explicit test layers.

    line 62
  18. Distinctive:

    Never add arbitrary real sleeps when deterministic synchronization can express the condition.

    line 65
  19. Distinctive:

    Read the matching references and project-local source.

    line 74
  20. Distinctive:

    Run the project's typecheck and focused tests.

    line 77

“Common” is measured: kept by at least 6 in 10 of the 14 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

Ground every recommendation in the target project. Inspect repository instructions, the pinned effect version, installed package source, and local conventions before choosing APIs. Prefer project evidence over remembered signatures.

Choose the Relevant Guidance

Read only the references needed for the task, and combine them when concerns overlap:

  • Schema, records, variants, brands, and typed errors: references/SCHEMA.md
  • Services, layers, modules, scope ownership, and Effect.fn: references/SERVICES_LAYERS.md
  • Configuration and providers: references/CONFIG.md
  • Schedules, retry, repeat, polling, and pacing: references/SCHEDULING.md
  • Cache, memoization, in-flight dedupe, and request batching: references/CACHING.md
  • Streams, queues, PubSub, SubscriptionRef, and long-lived consumers: references/STREAMS.md
  • HTTP clients, decoding, retries, and rate limits: references/HTTP_CLIENTS.md
  • Effect-aware tests, TestClock, layers, and synchronization: references/TESTING.md

Model Data and Failures

  • Use Schema.Struct(...) for application records.
  • Use brands for scalar IDs and constrained values.
  • Use tagged Schema variants and unions for values that cross boundaries.
  • Decode unknown boundary data with Schema.decodeUnknownEffect(...).
  • Model expected failures with Schema.TaggedErrorClass.
  • Never use casts or throwing construction to skip validation at untrusted boundaries.

Build Explicit Services and Layers

  • Keep business rules in named workflows and services.
  • Represent dependencies explicitly in the Effect environment.
  • Build implementations with layers that own resource lifetime.
  • Keep HTTP and transport handlers focused on decoding, context, invocation, and response mapping.
  • Wrap public or non-trivial service methods with named Effect.fn calls.
  • Do not hide required authority, credentials, persistence, or transports behind defaults.

Choose Runtime Primitives by Meaning

  • Use Config for runtime configuration and override it with providers in tests.
  • Use Schedule for retry, repeat, polling, pacing, and backoff.
  • Use Cache or Effect memoization when their ownership and eviction model fit.
  • Use request batching only when the backend exposes a real batch operation.
  • Use Queue, PubSub, SubscriptionRef, and Stream according to producer, consumer, broadcast, and backpressure needs.
  • Keep long-lived fibers scoped to the layer or resource that owns them.

Keep Boundaries Truthful

  • Wrap HTTP clients, SDKs, CLIs, and external systems in named Effect boundaries.
  • Decode persisted and external values before treating them as domain data.
  • Preserve distinct transport, status, decode, and domain failures.
  • Retry only proven transient failures on idempotent operations with a bounded policy.
  • Keep exhausted failures visible unless the boundary has a real fallback.
  • Keep provider and network calls outside authoritative database transactions.

Test Deterministically

  • Use Effect-aware tests and explicit test layers.
  • Fork time-dependent work before advancing TestClock.
  • Coordinate concurrent work with Deferred, Queue, Latch, Ref, fibers, or explicit hooks.
  • Never add arbitrary real sleeps when deterministic synchronization can express the condition.

Preserve Types and Dependencies

Solve missing requirements through explicit service and layer composition. Do not use as any, non-null assertions, broad cause recovery, Layer.mergeAll, provideMerge, or default authority merely to make code compile.

Before Editing

  1. Identify every Effect concern in the task.
  2. Read the matching references and project-local source.
  3. Choose APIs supported by the pinned version.
  4. Make the smallest architecture-preserving change.
  5. Run the project's typecheck and focused tests.

Download now (ZIP)

Does it work?

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

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.