/ce:effectfrom ce
Writes and reviews Effect v4 TypeScript code against the installed release, avoiding Effect 3 traps. Covers services, layers, errors, schemas, resources, fibers, retries, config, logging, HttpApi, HttpClient, SQL, effect/cli, and @effect/vitest tests.
Ships in ce. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
If the current repo has its own Effect rules (check .claude/rules/, AGENTS.md and CLAUDE.md), those take precedence. Apply this skill where they're silent.
This skill covers Effect 4 patterns and the traps that models carry over from Effect 3. Where it states a default or a behavior of a specific API, that was observed in 4.0 and is marked so: confirm it in the installed source before relying on it, because minor releases change defaults and unstable modules. A new major needs a fresh review of this skill.
Start from Effect's own agent guide, which ships inside the package at node_modules/effect/AGENTS.md (resolved from the workspace package you're changing). It's the official entry point: house style for Effect.gen, Effect.fn and services, plus a topic index that links one runnable example per topic under node_modules/effect/ai-docs/src/. It matches the installed release, so it doesn't go stale the way this skill or the web can. This skill adds what that guide doesn't say: the old-major traps and the gotchas below.
Effect 3, the 4.0 prereleases and 4.0 stable are all mixed together in model memory and on the web. In order of authority:
dist/**/*.d.ts) for names and signatures, and the source (src/**/*.ts) for behavior. Resolve effect from the workspace package you're changing, not the repo root; Bun can link it under node_modules/.bun/.node_modules/effect/AGENTS.md and the ai-docs/src/ example it links for the task. Read the section and example that match the task, not every example./effect-ts/effect) or effect.website v4 docs, when available, for explanation. They track main, so confirm anything release-sensitive against step 1.Before writing a name you haven't seen in this repo's code, check it exists (from the package directory):
node --input-type=module -e 'import { Effect } from "effect"; console.log("catchAll" in Effect)'
Find the package directory with node -p 'require("path").dirname(require.resolve("effect/package.json"))' run from the workspace package. Inside it:
| What | Where |
|---|---|
| A module's API docs | src/<Module>.ts (src/Effect.ts, src/Layer.ts, src/Schema.ts); unstable modules under src/http/, src/http-api/, src/sql/, src/cli/, src/testing/ |
| Signatures only | dist/<Module>.d.ts, same layout |
| The vendor's agent guide | AGENTS.md, an index of topics with one example file each |
| Runnable examples | ai-docs/src/<topic>/ |
| Platform and test helpers | the same layout inside @effect/platform-node and @effect/vitest (src/) |
Each export's JSDoc in src/ has When to use, Details and Gotchas sections, and the Gotchas carry the behavior this skill can only summarize (defaults, interruption, what a recovery skips). To read the docs for one function, search for its declaration and read the comment above it, for example grep -n "^export const retryTransient" src/http/HttpClient.ts. To survey a module's traps, grep -n -A6 "\*\*Gotchas\*\*" src/<Module>.ts. Source files are large, so read by line range, never whole.
When a name is missing, find the concept in the declarations. Don't add a shim, install @effect/schema, or copy an Effect 3 helper.
| Effect 3 or a 4.0 prerelease | Effect 4 |
|---|---|
Context.Tag, Context.GenericTag, Effect.Tag, Effect.Service, ServiceMap | class X extends Context.Service<X, Shape>()("app/X"), or Context.Service<Shape>("app/X") |
Layer.scoped | Layer.effect (it removes Scope from the layer's requirements) |
Effect.catchAll, catchAllCause, catchAllDefect | Effect.catch, catchCause, catchDefect |
Effect.either, Either | Effect.result, Result (.success, .failure, Result.isFailure) |
Effect.async | Effect.callback((resume, signal) => ...), returning a cleanup Effect |
Effect.fork, forkDaemon | forkChild, forkScoped, forkIn, forkDetach |
Effect.zipRight, tapErrorCause | Effect.andThen, tapCause |
yield* option or yield* either inside Effect.gen | yield* Effect.fromOption(o) (fails with Cause.NoSuchElementError) or Effect.fromResult(r); Option and Result aren't Effects, and yielding one is a defect |
Schedule.intersect/both, Schedule.union/either | Schedule.max, Schedule.min |
Schema.TaggedErrorClass, Schema.ErrorClass | Schema.TaggedError<X>()("X", fields) |
@effect/schema, Schema.decodeUnknown, Schema.parseJson | Schema from effect, decodeUnknownEffect, Schema.fromJsonString |
Schema.Union(a, b), Schema.Literal("a", "b") | Schema.Union([a, b]), Schema.Literals(["a", "b"]) |
Schema.filter(...) | .check(Schema.makeFilter(...)) or a built-in check (Schema.isInt(), Schema.isPattern(re)) |
Config.string, Config.integer, Options.boolean | Config.String, Config.Int, Flag.Boolean (constructors are capitalized) |
@effect/platform, @effect/cli, @effect/sql, effect/unstable/http | effect/http, effect/http-api, effect/cli, effect/sql; drivers and runtimes stay in @effect/platform-* and @effect/sql-* |
Modules imported without unstable can still be marked @stability unstable (CLI, HTTP, sockets, Crypto, ErrorReporter). Check the declaration before assuming a shape survives an upgrade.
Effect.gen for inline code. A reusable function returning an Effect is Effect.fn("name")(function* (...) {...}, ...combinators) when it's a useful tracing boundary and Effect.fnUntraced otherwise. Pass combinators as extra arguments; don't .pipe an Effect.fn. Annotate with Effect.fn.Return<A, E, R>. Pure calculations stay plain functions.return yield* new SomeError({...}) so TypeScript knows the branch ends.Effect.succeed(x) has already evaluated x. Use sync, try, tryPromise or suspend for work that should happen when the effect runs.FiberSet), and some owner observes its failure.Effect.runPromise or runSync inside Effect code or inside a callback created by it.Load the reference that matches the task; load several when work spans them.
| Task | Read |
|---|---|
A growing Effect.gen body, where a decision or shared helper goes, refactoring a module for readability | references/structure.md |
Wrapping promises, callbacks or throwing code; tagged errors and their per-tag policy; catch*; Result, Exit, Cause; defects; interruption | references/errors.md |
Context.Service, layers, memoization, dependency capture, request-scoped values, ManagedRuntime | references/services-layers.md |
Scopes, acquireRelease, forks, background workers, Effect.cached, Ref, locks, timeouts, schedules, retries, Clock, Random, DateTime | references/resources-concurrency.md |
| Schema definitions, decoding, encoding, optional keys, transformations, brands, JSON Schema | references/schema.md |
@effect/vitest, TestClock, TestConsole, test layers, asserting failures | references/testing.md |
HttpClient, HttpApi, HttpRouter, middleware, web handlers | references/http.md |
SqlClient, SqlSchema, transactions | references/sql.md |
effect/cli commands, flags, parser errors, help | references/cli.md |
Config, ConfigProvider, Redacted, where defaults live, loggers, annotations, spans | references/config-observability.md |
For a topic not listed (streams, PubSub, batching, child processes, AI, cluster), start from the matching entry in node_modules/effect/AGENTS.md.
references/cli.md (opens in a new tab)references/config-observability.md (opens in a new tab)references/errors.md (opens in a new tab)references/http.md (opens in a new tab)references/resources-concurrency.md (opens in a new tab)references/schema.md (opens in a new tab)references/services-layers.md (opens in a new tab)references/sql.md (opens in a new tab)references/structure.md (opens in a new tab)references/testing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/architecting-systemsGuides clean, scalable system architecture during the build phase. Use when designing modules, defining boundaries, structuring projects, managing dependencies, or preventing tight coupling and brittleness as systems grow./deliverTakes a feature, plan or RFC to production-ready code merged to main, with emphasis on architecture and code quality. Adopts or writes a phased plan, has it critiqued against the codebase, scaffolds contracts, runs parallel subagent lanes, lands and tags each phase on a feature branch as it finishes, reviews every lane with a capped review cycle, and merges to main after approval. Use when asked to execute, implement or ship a plan or RFC, for "have DA review it, then implement", "implement, review and merge to main", or for work that needs full review depth. For timeboxed or prototype work, use sprint./designDesign direction and craft rules for product UIs (dashboards, admin tools, SaaS apps, data-heavy interfaces), with a list of AI-default styles to avoid and CSS or Tailwind implementation details. Use when building or restyling a page, component, layout, or theme, choosing color, type and spacing, or when a UI looks generic./handling-errorsPrevents silent failures and context loss in error handling. Use when writing try-catch blocks, writing error messages or error responses, designing error propagation, reviewing catch blocks, or implementing Result patterns./managing-databasesDatabase architecture and SQL guidance for PostgreSQL, DuckDB, Parquet, PGVector, and Neo4j. Use when designing schemas, choosing a storage engine, writing or reviewing non-trivial SQL, adding indexes, tuning slow queries, or configuring vector and graph workloads./planning-productsDefines product features from a PM perspective (JTBD, competitive research, scope negotiation) before technical planning. Use when scoping features, writing product specs, defining user problems, or choosing what to build.npx claudepluginhub rileyhilliard/claude-essentials --plugin ceOther plugins' skills for the same job