The single guide for writing Effect v4 TypeScript that reads like the Effect source itself — using Effect APIs from the installed docs instead of memory, module and file layout, data types, dual APIs, naming, type-level design, services, layers, errors, TSDoc with runnable examples, runtime and type tests, package manifests and tooling — checked against a pinned clone of Effect-TS/effect. Use whenever writing, reviewing or documenting any Effect v4 code (library packages, apps, tools, tests), designing a public API, or setting up a package.
Ships in envoy-skills. 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.
The goal: a reader who knows the Effect v4 source cannot tell your module apart from one in
packages/effect/src. Same file layout, same names, same data-type construction, same dual
signatures, same TSDoc, same tests.
The source of truth is Effect itself, not this skill and not memory: the installed package
(node_modules/effect: AGENTS.md, ai-docs/, src/) for the APIs you call, and a clone of
Effect-TS/effect for style, tests, tooling and the maintainers' own rules. Effect v4 lives on
main of Effect-TS/effect (Effect-TS/effect-smol is archived). Facts here were verified
against main at effect 4.1.5 (commit 66ab992, 2026-11-20); re-check anything that matters.
Ground every Effect API you use in the installed docs, never memory of Effect 3 or v4 betas:
node_modules/effect/AGENTS.md completely once per session;node_modules/effect/ai-docs and node_modules/effect/src for each API and concept
involved, and read the matching examples and signatures;Ready to write when every material API has matching local guidance, or a search showed none exists.
Get a reference clone for style (once per machine, refresh before large work); see references/reference-clone.md:
git clone --depth 1 https://github.com/Effect-TS/effect.git ~/.cache/effect-reference
git -C ~/.cache/effect-reference log -1 --format='%H %cd'
Find the closest analogue and open it side by side:
| Writing | Read in packages/effect/src |
|---|---|
| small immutable data type, all in one file | Redacted.ts + internal/redacted.ts, Duration.ts |
| collection, set algebra, or hidden representation | HashSet.ts + internal/hashSet.ts, HashMap.ts |
| tagged union / result type | Option.ts, Result.ts, Exit.ts |
| predicates and combinators | Predicate.ts, Filter.ts, Order.ts, Equivalence.ts |
| service + layers | Context.ts, ai-docs/src/01_effect/03_services/* |
| error family with reasons | PlatformError.ts, crypto/CryptoError.ts |
| declaration-as-data + Layer implementation | http-api/HttpApiEndpoint.ts, http-api/HttpApiBuilder.ts |
| application code (handlers, services, wiring) | ai-docs/src/** |
| satellite package | packages/opentelemetry |
Load the reference files that apply before editing:
| Topic | File |
|---|---|
| Monorepo, package.json, exports, tsconfig, build, barrels | references/packages.md |
| Module files, imports, internal files, ordering, function bodies | references/modules.md |
| Data types: TypeId, interface, prototype, Equal/Hash/Pipeable | references/data-types.md |
Public API shape: dual, overloads, naming, options, type-level design | references/api-design.md |
| Effects, services, layers, errors, Schema | references/effects-services-errors.md |
| TSDoc, stability, categories, runnable examples | references/tsdoc.md |
| Runtime tests, type tests, doctests, property tests | references/testing.md |
| Formatter, linter, compiler, diagnostics, scripts, changesets | references/tooling.md |
| Final review before committing | references/checklist.md |
Write, then compare with the analogue line by line: names, overload order, doc sections, tag order, test style. Differences need a reason.
Validate with the narrowest commands that cover the change (see references/tooling.md) and report anything you could not run.
Grants.ts); its main type has the module's
name (Grants.Grants). Implementation details go in src/internal/camelCase.ts, every export
there tagged /** @internal */.@stability, @since); every public export
has a TSDoc block ending in @stability, @category, @since.import * as Effect from "effect/Effect", never the
effect barrel (tests, examples and app code may use the barrel). Relative imports end in
.ts. Type-only imports are import type.interface plus a prototype object and Object.create, not classes. TypeIds
are private strings "~<package>/<Module>". Values implement Pipeable, Equal/Hash where
meaningful, Inspectable where inspection is useful, and have an isX guard.dual: data-last overloads first, data-first second, first parameter
self. Refinement overloads come before predicate overloads.readonly object parameter with ?: T | undefined fields.make, empty, fromX; guards isX; throwing or unchecked variants end in
Unsafe (makeUnsafe, not unsafeMake); layers are layer / layerX.Data.TaggedError or Schema.TaggedError); related
failures form one error with a reason union. Library internals use Effect.fnUntraced;
boundaries that deserve a span use Effect.fn("Module.name"). Fail with return yield* error.```ts import.meta.vitest fences with // => assertions, run by
@effect/doctest. No @example tags.@effect/vitest (it.effect, assert), type tests use tstyche in typetest/.effect/internal/* or copy internal helpers such as PipeInspectableProto; use the
public equivalents (Pipeable.Prototype, Inspectable.BaseProto).export {}, runtime namespaces (erasableSyntaxOnly), any to
silence inference, or classes for plain data types.Effect.runPromise, runSync) except at documented runtime
boundaries.Effect.Tag, Context.GenericTag, Either,
Schema.TaggedErrorClass, effect/unstable/* paths, Layer.scoped) — check the docs and clone.references/api-design.md (opens in a new tab)references/checklist.md (opens in a new tab)references/data-types.md (opens in a new tab)references/effects-services-errors.md (opens in a new tab)references/modules.md (opens in a new tab)references/packages.md (opens in a new tab)references/reference-clone.md (opens in a new tab)references/testing.md (opens in a new tab)references/tooling.md (opens in a new tab)references/tsdoc.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/changesetsRelease notes with Changesets. Use when a change affects a published package, when choosing a version bump, or when preparing or reviewing a release./dependenciesDependency policy for this pnpm workspace. Use when adding, upgrading, removing or pinning a dependency, editing the pnpm catalog, or reviewing a Dependabot PR./package-developmentAdding or changing a workspace package. Use when creating a package or app, making a private package publishable, renaming a package, or changing its entry points.Other plugins' skills for the same job
/envoy-skills:effect-conventionsfrom envoy-skills
npx claudepluginhub envoy1084/skills --plugin envoy-skills