effect

A project-specific guide for writing and maintaining Effect v4 and effect-smol code in TypeScript. Effect is a TypeScript library for composing typed services, data validation, and workflows.

In plain words
What is it for?
Use it when answering questions or implementing code involving Effect services, schemas, workflows, errors, and related TypeScript conventions.
Why use it?
It helps developers use the current library APIs and the repository’s local patterns instead of relying on outdated examples or memory.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kylepelham/drift/effect
Any agent
npx skills add kylepelham/Drift --skill effect
Clone the repo
git clone --depth 1 https://github.com/kylepelham/Drift

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 586 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00586
Opus 5 $0.00009 $0.00293
Sonnet 5 $0.00003 $0.00117
Haiku 4.5 $0.00002 $0.00059

Measured 2d ago against content hash 0d27f8d40455, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

effect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to effect — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

engine/upstream/.opencode/skills/effect/SKILL.md · 39 lines

How it starts

The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Effect

This codebase uses Effect for typed, composable TypeScript services, schemas, and workflows.

Source Of Truth

Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 examples.

  1. If .opencode/references/effect-smol is missing, clone https://github.com/Effect-TS/effect-smol there. Do this in the project, not in the skill folder.
  2. Search .opencode/references/effect-smol for exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code.
  3. Also inspect existing repo code for local house style before introducing new patterns.
  4. Prefer answers and implementations backed by specific source files or nearby repo examples.

Guidelines

  • Prefer current Effect v4 APIs and project-local patterns over old blog posts, examples, or package-memory guesses.
  • Use Effect.gen(function* () { ... }) for multi-step workflows.
  • Use Effect.fn("Name") or Effect.fnUntraced(...) for named effects when adding reusable service methods or important workflows.
  • Prefer Effect Schema for API and domain data shapes. Use branded schemas for IDs and Schema.TaggedErrorClass for typed domain errors when modeling new error surfaces.
  • Keep HTTP handlers thin: decode input, read request context, call services, and map transport errors. Put business rules in services.
  • In Effect service code, prefer Effect-aware platform abstractions and dependencies over ad hoc promises where the surrounding code already does so.
  • Keep layer composition explicit. Avoid broad hidden provisioning that makes missing dependencies hard to see.
  • In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior.
  • Do not introduce any, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types.
  • Do not answer from memory. Verify against .opencode/references/effect-smol or nearby code first.

Testing Patterns

  • Use testEffect(...) from packages/opencode/test/lib/effect.ts for tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations.
  • Use it.live(...) for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior.
  • Run tests from package directories such as packages/opencode; never run package tests from the repo root.
  • Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file.
  • Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state.

Read the full file on GitHub · 39 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 39 lines · 17 tokens per session scan A 0d27f8d40455

Subscribe to this mod's changes

effect is a skill published in the GitHub repository kylepelham/Drift (20 stars, last pushed 2d ago), licensed MIT. It adds 17 tokens to every session and 586 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to effect, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

qa-testing

Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…

openinterpreter/openinterpreter · 77 tokens

best-of-n

Generate a small set of independent candidate solutions in worktrees, judge them against one explicit rubric, and apply the winner only after PASS verification.

Hmbown/CodeWhale · 32 tokens

contributor-onboarding

Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.

Hmbown/CodeWhale · 57 tokens

fleet-manager

Use when managing, triaging, restarting, escalating, or summarizing Codewhale Agent Fleet runs and workers.

Hmbown/CodeWhale · 26 tokens

handoff

Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / "pass the baton" / "hand off", or a long-running operation needs a durable state checkpoint.

Hmbown/CodeWhale · 70 tokens

codew-release-qa-sweep

Use before claiming CodeWhale release work is done: run the full gate sweep and list the manual QA targets.

Hmbown/CodeWhale · 31 tokens