All skills
paulrberg avatar

/effect-ts

@5a97bbf
by Paul Bergpaulrberg/agent-skills94 stars
7

Use for nontrivial Effect 3 work including services/layers, typed errors, Schema/JSONSchema, Config, runtime/concurrency, @effect/vitest, @effect/ai, @effect/sql, Effect Atom, or @prb/effect-next.

Use this Skill: https://skilld.dev/gh/paulrberg/agent-skills/effect-ts

This session only. Nothing lands on disk.

referenceseffect-atom.md

≈415 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Effect Atom

Effect Atom separates core atoms from framework bindings. Verify APIs against the installed packages:

  • core constructors, Registry, Result, RPC, and HTTP integrations: @effect-atom/atom/*;
  • React hooks and Registry provider: @effect-atom/atom-react.
import * as Atom from "@effect-atom/atom/Atom";
import * as Result from "@effect-atom/atom/Result";
import { RegistryProvider, useAtomSet, useAtomValue } from "@effect-atom/atom-react";

Atom Semantics

  • Atom.make(value) creates writable state; Atom.make(get => value) creates derived state.
  • An Effect or Stream passed to Atom.make produces a Result, not the raw success value.
  • Use Atom.family for stable parameterized atoms and Atom.keepAlive only when state must outlive component mounts.
  • Use Atom.runtime(layer) when atoms need an Effect runtime with services.
  • Atom.fn creates a writable Effect/Stream function. Its handler receives the written argument and atom context.
  • Use get.addFinalizer or a scoped Effect for listeners and resources owned by an atom.

React Boundaries

Use useAtomValue to read and useAtomSet to write. For Effect-backed mutation atoms, select mode: "promiseExit" when the caller must branch on typed success or failure; do not throw away the Exit merely to mimic an untyped async callback.

Render Result states explicitly, including initial/waiting and failure. Use suspense hooks only when the surrounding React boundary is designed to suspend or surface failures.

Inspect AtomRpc, AtomHttpApi, and hydration modules only when the task uses them; do not load their APIs for ordinary state work.

Source: SKILL.md on GitHub

No alerts7d5 checks · Risk SAFE
  • Gen Agent Trust Hub7d

    The skill provides comprehensive guidelines and best practices for developing with the Effect 3 library ecosystem. It focuses on correct usage of functional programming patterns, error handling, configuration management, and testing, while promoting security-aware practices like secret redaction and runtime schema validation.

  • Socket7d

    No alerts

  • Snyk7d

    Risk: LOW · No issues

  • Runlayer6mo

    7 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 5a97bbf. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
Other metadata
compatibility
Requires a project using current stable Effect 3 packages; verify exact APIs against the target's installed package source.

README badge

README badge for paulrberg/agent-skills/effect-ts