agentleFS
DobroslavRadosavljevicDobroslavRadosavljevic/cabrakan/.agents/skills/effect/SKILL.md

effect

Skill1 starsChanged 3 months agoMITView on GitHub

Build, review, debug, migrate, or plan Effect v4 beta TypeScript code with current docs. Use for effect@beta, Effect, Effect.gen, Context.Service, Context.Reference, Layer, ManagedRuntime, Config, ConfigProvider, Scope, Fiber, Stream, Queue, Result, Cause, Schema v4, Schema.Class, Schema.TaggedErrorClass, Schema.decodeUnknown, Schema.encode, unstable modules, effect/unstable/http, platform packages, @effect/vitest, and Effect v3 to v4 migrations.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vercel-composition-patterns, vercel-react-best-practices and 4 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.
  • SentrySkill

    vercel-composition-patterns

    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 4 projects that use this

  • Microsoft AzureSkill

    humanizer

    Tone enforcement patterns for external-facing community responses

    Also in 4 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    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

  • +1 more from google

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when work touches Effect v4 beta usage, service/layer architecture, runtime entrypoints, Schema v4, platform modules, …

    line 8
  2. Distinctive:

    Prefer explicit service and layer composition over hidden globals.

    line 26
  3. Distinctive:

    Keep framework/process edges thin.

    line 27
  4. Very specific:

    Treat effect/unstable/* APIs as beta-plus-unstable.

    line 28
  5. Very specific:

    Use Context.Service for v4 services.

    line 33
  6. Very specific:

    Prefer yield* Service inside Effect.gen for service access.

    line 34
  7. Very specific:

    Use ManagedRuntime.make(layer) for repeated JS entrypoint runs against shared services, and dispose it when done.

    line 37
  8. Very specific:

    Use Effect.runPromise, runPromiseExit, runFork, or their With variants only at application edges.

    line 38
  9. Distinctive:

    Prefer typed failures and tagged error classes over throwing.

    line 40
  10. Very specific:

    Keep Schema v4 encode/decode direction visible at boundaries.

    line 41
  11. Distinctive:

    Prefer the repo's existing checks.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 17 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 this skill when work touches Effect v4 beta usage, service/layer architecture, runtime entrypoints, Schema v4, platform modules, testing, or migrations from Effect v3.

Workflow

  1. Inspect the local Effect surface before changing code:
    • Package versions for effect, @effect/*, TypeScript, runtime platform packages, test libraries, and adapters.
    • Imports: root effect, direct modules like effect/Effect, effect/Schema, effect/unstable/*, platform packages, or old v3 packages.
    • Runtime boundary: CLI, HTTP handler, worker, server, browser, test, library, or framework-managed entrypoint.
    • Dependency shape: services, layers, config providers, platform layers, managed runtimes, and scope ownership.
  2. Clone Effect-TS/effect-smol into .temp/effect-smol (if missing) and always browse that checkout when referencing Effect v4 code — APIs, migration guides, package READMEs, and tests. Do not rely on memory or stale docs alone. Details: source-map.md.
  3. Refresh current docs whenever the task asks for latest behavior or the local beta version is different. Start from source-map.md.
  4. For install/version, core Effect usage, generator style, typed errors, async interop, config, and runtime boundaries, use setup-core.md.
  5. For services, Context.Service, references, layers, memoization, scopes, and ManagedRuntime, use services-layers-runtime.md.
  6. For Schema v4 shapes, validation, classes, tagged errors, transformations, codecs, serialization, and JSON Schema generation, use schema-v4.md.
  7. For @effect/vitest (runners, TestClock, layers, flaky/live, good/bad patterns), use vitest-testing.md.
  8. For v3 to v4 migration, unstable modules, and HTTP/platform packages, use migration-platform-testing.md.
  9. Implement in the existing project style:
    • Match the installed beta version and local import style.
    • Prefer explicit service and layer composition over hidden globals.
    • Keep framework/process edges thin; push business logic into Effects, services, and layers.
    • Treat effect/unstable/* APIs as beta-plus-unstable. Check installed declarations before using or recommending them.

Effect Judgment

  • Effect v4 is beta. Be honest about API drift and verify local declarations before making broad changes.
  • Use Context.Service for v4 services. Do not introduce v3 Context.Tag, Context.GenericTag, Effect.Tag, or Effect.Service patterns in v4 code.
  • Prefer yield* Service inside Effect.gen for service access. Use Service.use and useSync only for small, local one-liners.
  • Define layers explicitly with Layer.succeed, Layer.effect, or Layer.effectDiscard; wire dependencies with Layer.provide and Layer.provideMerge.
  • Compose and provide layers once when possible. Use Layer.fresh or Effect.provide(..., { local: true }) only for intentional isolation.
  • Use ManagedRuntime.make(layer) for repeated JS entrypoint runs against shared services, and dispose it when done.
  • Use Effect.runPromise, runPromiseExit, runFork, or their With variants only at application edges.
  • Inside Effect.gen, yield* works with Yieldable values. Outside generators, convert non-Effect Yieldables explicitly or use module functions such as Ref.get, Deferred.await, and Fiber.join.
  • Prefer typed failures and tagged error classes over throwing. Use defects only for unrecoverable programmer errors.
  • Keep Schema v4 encode/decode direction visible at boundaries; do not assume decoded Type and encoded input are the same.
  • For tests: install v4 @effect/vitest@beta (→ 4.0.0-beta.x; never bare/latest → 0.30.x v3). Prefer it.effect (already scoped + TestClock/TestConsole). Import TestClock from effect/testing. Do not use it.scoped / it.scopedLive for Effect Scope. Treat layer() as shared across tests unless you Effect.provide per test.

Verification

Prefer the repo's existing checks. For meaningful Effect v4 work, include the relevant subset:

  • Typecheck for Effect<A, E, R> requirements, service availability, layer composition, Schema encoded/type sides, and beta API names.
  • Focused tests with @effect/vitest@beta (it.effect, TestClock, scoped resources, typed Exit/Result failures). Use per-test Effect.provide when isolation matters; treat shared layer() as suite-scoped.
  • Runtime smoke at JS/framework edges where Effects are run or managed runtimes are disposed.
  • Schema decode/encode tests for valid input, invalid input, defaults, excess properties, transformations, classes, tagged errors, and generated JSON Schema.
  • Migration scans for v3-only APIs, old package imports, old catch/fork names, old runtime patterns, FiberRef, Either, and removed Schema APIs.

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.