effect
Effect v4 implementation guidance. Use for Effect workflows, Schema models, services and Layers, Config, Schedule or retry, Cache, Stream, unstable HTTP, reactivity or Atom, and Effect tests. Resolve the project-pinned version before applying a branch.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- effect
- license
- MIT
- description
- Effect v4 implementation guidance. Use for Effect workflows, Schema models, services and Layers, Config, Schedule or retry, Cache, Stream, unstable HTTP, reactivity or Atom, and Effect tests. Resolve the project-pinned version before applying a branch.
- compatibility
- Requires Effect v4. See references/UPSTREAM.md for the exact audited versions.
02 资源文件 17
- 参考文档agents/openai.yaml98 B
- 参考文档references/CACHING.md4.6 KB
- 参考文档references/CONFIG.md2.7 KB
- 参考文档references/EFFECT_ATOM.md9.2 KB
- 参考文档references/HTTP_CLIENTS.md4.2 KB
- 参考文档references/SCHEDULING.md4.5 KB
- 参考文档references/SCHEMA.md10.6 KB
- 参考文档references/SERVICES_LAYERS.md4.2 KB
- 参考文档references/STREAMS.md5.9 KB
- 参考文档references/TESTING.md4.3 KB
- 参考文档references/UPSTREAM.md621 B
- 脚本validation/forbidden.mjs1.6 KB
- 参考文档validation/package.json512 B
- 参考文档validation/pnpm-lock.yaml37.9 KB
- 参考文档validation/README.md396 B
- 脚本validation/smoke.ts2.2 KB
- 参考文档validation/tsconfig.json305 B
03 SKILL.md 正文
Effect
Work source-verified: project conventions and the project-pinned Effect source take precedence over this reference.
Version Gate
Complete these in order:
- Read the nearest
AGENTS.mdand any project-local Effect practices document; finish with the applicable conventions identified. - Resolve the installed
effectversion and inspect its exported source; finish with the definitions for every API the task will touch located. - Compare that version with
references/UPSTREAM.md; finish with one authoritative snapshot selected, usingsource-contextto resolve mismatches or missing source. - Read every matching branch below. Editing begins after all applicable references are loaded.
Branch Chooser
- Data models, schemas, brands, variants, optional keys, or decoders: read
references/SCHEMA.md. - Services, 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/unstable/reactivity,@effect/atom-*,AsyncResult, API-backed UI, frontend queries or mutations, 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. - Maintaining this skill or its audited package pins: read
validation/README.md.
Cross-Cutting Defaults
- Compose inline workflows with
Effect.gen; define reusable traced operation boundaries withEffect.fn("Domain.operation"). - Use
Effect.fnUntracedfor reusable helpers whose stack-frame and span metadata are intentionally unnecessary. - Keep expected failures typed and preserve defects and interruption for the owning supervision boundary.
- Decode unknown boundary input with
Schema.decodeUnknownEffect; useschema.makeEffectfor typed constructor input whose type-side validation can fail. - Keep long-lived resources and background work scoped to the Layer or component that owns their lifetime.
- Retry only idempotent operations, at the narrowest boundary that can classify the failure truthfully.
- Preserve type information and solve Effect typing problems without unchecked casts or non-null assertions.
Boundary Rules
- Keep HTTP handlers thin: decode input, read context, call services, map typed errors to transport responses.
- Place business rules in services or domain functions.
- 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.
- Let exhausted failures remain visible unless the boundary has a real fallback.
Completion Criterion
Before finishing:
- account for every Effect API introduced or changed against the project-pinned source
- apply every branch selected by the task
- run the narrowest relevant typecheck and tests
- leave no unchecked cast, swallowed interruption, unscoped long-lived work, or unbounded retry introduced by the change
The work is complete only when every item above is checkable and satisfied.
04 同仓库更多 Skills
artiflow
Publish a polished visual Artifact for the current plan, report, review, or explanation.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wayfinder
Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
wait-what
Stop. That last message did not land — re-pitch it.
turborepo
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
triage
Move issues and external pull requests through triage roles — categorise, verify, grill if needed, and write agent-ready briefs.