effect-program-design
O que ela faz
Ele orienta o agente de IA a construir aplicativos TypeScript com Effect, com serviços claros, erros tipados e layers fáceis de testar. É para desenvolvedores que usam a biblioteca Effect e querem um código fácil de manter.
Quando usar
- ✓Quando você está criando ou alterando um serviço ou layer em um aplicativo Effect.
- ✓Quando você precisa de erros tipados, configuração ou workers em segundo plano em um programa Effect.
- ✓Quando você quer testes que troquem dependências reais por versões falsas nas fronteiras certas.
Link da skill
https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/effect-program-design/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Me ajude a adicionar um serviço de envio de e-mail ao meu app Effect, com tratamento de erros adequado e testes.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente primeiro verifica as convenções do seu projeto e a versão instalada do Effect, depois escreve código que segue os padrões da biblioteca. Ele usa interfaces de serviço pequenas para que cada parte seja fácil de testar.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Preciso já conhecer o Effect?
Algum conhecimento de TypeScript ajuda, mas a skill guia o agente pelos padrões do Effect.
Ele vai respeitar a versão do Effect que eu tenho instalada?
Sim. Ele verifica a versão instalada e checa os exemplos contra ela, já que alguns módulos mudam entre versões.
Quais partes do Effect ele cobre?
Serviços, schemas, erros, configuração, concorrência, streams, cache e clientes HTTP.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 13 mil
- Posição no ranking
- #11384
- Licença
- Apache-2.0
- Atualizada em
- 31/10/2026
Comentários
- …
Mais skills deste repositório
asd-ste100
13 milEnsina seu agente a reescrever textos confusos em inglês, usando frases curtas e com um único sentido, fáceis de ler para pessoas e outros softwares.
better-github-skill
13 milAjuda seu agente a checar o status de um pull request, ler os comentários de revisão e descobrir por que um build de CI falhou, com scripts prontos do GitHub.
calldiff
13 milAjuda seu agente a comparar as cadeias de chamadas de funções em um código entre duas versões do git, para que a revisão veja o que mudou no comportamento.
chrome-devtools-cli
13 milPermite que seu agente controle o Chrome pelo terminal para abrir páginas, clicar, preencher formulários e tirar capturas da página, para automação e testes de navegador.
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.