effect-program-design
What it does
It guides the AI agent in building Effect TypeScript applications with clear services, typed errors, and layers that are easy to test. It is for developers who use the Effect library and want maintainable code.
When to use it
- ✓When you are building or changing a service or layer in an Effect application.
- ✓When you need typed errors, configuration, or background workers in an Effect program.
- ✓When you want tests that swap in fake dependencies at the real boundaries.
Skill link
https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/effect-program-design/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Help me add an email sending service to my Effect app, with proper error handling and tests.”
5 new skills a week. 1 minute to read.
How it works
The agent checks your project's conventions and the installed Effect version first, then writes code that follows the library's patterns. It uses small service interfaces so each part is easy to test.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Effect Program Design
Build production Effect v4 programs with small domain-shaped interfaces, typed success and error channels, declared dependencies, observable operation boundaries, and tests that substitute layers at real seams. This skill combines broad Effect mechanics with HumanLayer's deep-module, capture-before-narrow, and real-seam design standards.
Source rule
Check these before guessing:
- the nearest
CLAUDE.md/AGENTS.mdand project-local conventions; - the installed
effect,@effect/*, and related package versions and declarations; - the Effect v4 docs at https://effect-ts-effect-smol.mintlify.app/;
- the pinned/upstream source (
~/projects/effect-smol) when docs do not settle an API.
unstable-tagged modules (effect/http, effect/rpc, effect/process, ...) can change between beta/minor versions. Typecheck examples against the installed version. Local
project conventions take precedence unless the task explicitly changes them.
References
Read only the references relevant to the task; read all matching branches when work crosses concerns.
- Public module depth and domain-shaped APIs:
references/DEEP_MODULES.md. Read this any time you are modifying or creating services or layers - this is the core of our effect philosophy! - Service tags, live layers, file placement,
Effect.fn, or runtime composition:references/SERVICES_LAYERS.md. - Tagged errors, capture-before-narrow, spans, logs, or Sentry:
references/ERRORS_OBSERVABILITY.md. - Records, schemas, variants, optionality, brands, decoding, or construction:
references/SCHEMA_DATA_MODELING.md. - Config, env vars, providers, or secrets:
references/CONFIG_SECRETS.md. - HTTP/SDK/DB boundaries, Drizzle rows, JSONB, or transactions:
references/BOUNDARIES_PERSISTENCE.md. - Scopes, acquisition, concurrency, best-effort work, or workflow transitions:
references/RESOURCES_CONCURRENCY.md. - Retry, repeat, polling, pacing, backoff, or workers:
references/SCHEDULING_WORKERS.md. - Streams, queues, pubsub, pagination, backpressure, or long-lived consumers:
references/STREAMS.md. - Memoization, TTL caches, request dedupe, or batching:
references/CACHING_BATCHING.md. - Outgoing HTTP, provider adapters, status/decode handling, or HTTP retry:
references/HTTP_CLIENTS.md. - Effect tests, test services, clocks, synchronization, fakes, or real seams:
references/TESTING.md. - Platform-neutral services and the native-API boundary:
references/PLATFORM.md. - Node runtime, filesystem, path, crypto, child processes, sockets/WebSocket, Redis, or workers:
references/PLATFORM_NODE.md. - Effect Atom or React reactive Effect state:
references/EFFECT_ATOM.md. - TypeScript safety, Predicate refinements, Match dispatch, naming, collections, imports, and escape hatches:
references/TYPESCRIPT_CONTRACTS.md. - Local exemplars and foils:
references/REPOSITORY_EXAMPLES.md.
The creed
Deep modules. The interface is the cost and the hidden implementation is the benefit. Public operations use domain inputs and outputs; callers do not supply credentials, clients, rows, or other internals.
Everything stays in Effect. Keep expected failures in
E, dependencies inR, and resources in scopes. Do not pass services, layers, effects, or errors as ordinary values when composition expresses the relationship.Two-tier errors. Classify rich internal failures, capture them, then narrow to a small caller-actionable union. Prefer typed
catchTag/catchTags; never recover withinstanceof,Match, or manual_tagcomparisons. Respect the error channel! Errors stay in the error channel and are not passed as valuesObserve operations. Every public operation has a stable
Effect.fn("domain.operation"), an explicitEffect.withSpan, or both. Capture raw actionable/unexpected failures before narrowing or swallowing them.
Use Effect's logger to log info, errors, etc -yield* Effect.logError- do NOT pass in external loggers. Errors MUST also be captured to sentry as soon as they surface before they are re-mapped or transformed.someEffect.pipe( Effect.tapError(Effect.logError), Effect.tapError((e) => Effect.sync(() => Sentry.captureException(e))), )Test at real seams. Use
@effect/vitest, layers, deterministic test services, and real infrastructure where behavior depends on it. Assert both the result/error and externally v
FAQ
Do I need to know Effect already?
Some TypeScript knowledge helps, but the skill guides the agent through Effect's patterns.
Will it match my installed Effect version?
Yes. It checks the installed version and typechecks examples against it, since some modules change between releases.
Which parts of Effect does it cover?
It covers services, schemas, errors, configuration, concurrency, streams, caching, and HTTP clients.
Details
Original description by the author
Design, write, review, and test production Effect v4 programs: deep services and layers, schemas, tagged errors, observability, Config, persistence, resources, concurrency, schedules, workers, streams, caches, HTTP clients, Effect platform services (Node filesystem/path/crypto/process/socket), and Effect Atom integrations. Use for any Effect application or adapter work.
repo: humanlayer/humanlayer
Popularity
- GitHub stars
- 13k
- Ranking position
- #11384
- License
- Apache-2.0
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
asd-ste100
13kTeaches your agent to rewrite confusing English into short, one-meaning sentences that are easy for people and other software to read.
better-github-skill
13kHelps your agent check a pull request's status, read its review comments, and find why a CI build failed, using ready-made GitHub scripts.
calldiff
13kHelps your agent compare the chains of function calls in a codebase between two git versions, so a code review can see what behavior changed.
chrome-devtools-cli
13kLets your agent control Chrome from the terminal to open pages, click, fill in forms, and take page snapshots for browser automation and testing.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.