Effect v4

SkillDev tools

The effect-v4 skill gives an AI agent a guide for writing, reviewing, and upgrading Effect v4 TypeScript code. It covers Context.Service with explicit layers, Schema.TaggedError with typed recovery, and the effect/unstable/cli command surface, all pinned to effect@4.0.0-rc.117. The agent checks its work against a vendored source oracle and a v3-to-v4 rename table.

Use Effect v4 in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Effect v4 and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Effect v4 skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have a TypeScript project that uses Effect, or one you plan to move to Effect v4.

Effect v4Start free

What your AI can do with it

  • Write Effect v4 code using Context.Service and explicit layers
  • Use Schema.TaggedError with typed recovery in Effect v4
  • Build commands on the effect/unstable/cli surface
  • Upgrade Effect v3 code to v4 with the rename table
  • Verify changes with pnpm typecheck and example compilation
  • Check code against the vendored source oracle

Getting started

  1. Have a TypeScript project that uses Effect, or one you plan to move to Effect v4.
  2. Add the effect-v4 skill to your agent so it can load the pattern references.
  3. Pin the project to effect@4.0.0-rc.117 so the code matches the skill's version.
  4. Ask the agent to write, review, or upgrade Effect code, and let it consult the rename table and source oracle.
  5. Run pnpm typecheck and compile the examples to confirm the changes.

What this skill tells your AI

The instructions your AI receives, as published by composiohq/composio in .agents/skills/effect-v4/SKILL.md and read by ahel’s review.

The CLI, @composio/cli-keyring, and @composio/json-schema-to-effect-schema run on Effect v4 (release candidate). Every claim below is grounded in the migrated source, not memory of v3.

Exact version matrix

effect, @effect/platform-bun, and @effect/vitest are pinned to the same exact 4.0.0-rc.117 — never ^, @next, or a mismatched prerelease across packages. @effect/cli and @effect/platform no longer exist as dependencies; their surfaces are consolidated into effect and effect/unstable/*. See versions.json for the full matrix (also typescript, vitest).

Read next

  • references/core-patterns.md — services, layers, typed errors, Schema, choosing between Effect.gen and Effect.fn, and the v3→v4 rename table (labeled historical, for recognizing stale patterns).
  • references/cli-surface.md — effect/unstable/cli: Command, Flag, Argument, GlobalFlag, CliConfig, the custom CliOutput.Formatter, and the runner's double-print rule.
  • references/upgrade-workflow.md — procedure for bumping to a newer prerelease.

Code excerpts in those references are short quotes from real, currently-compiling repo files (path cited at each excerpt) — not standalone examples. The compile-checked source of truth is always the cited file itself; when it and a reference disagree, trust the file and fix the reference.

Non-negotiables

  • Effect.gen(function* () {...}) for effect values — the dominant form, including named module consts — and (params) => Effect.gen(...) for parameterized helpers. Effect.fn(...) is the function form whose effects carry stack-frame annotations (its optional name string adds a per-call tracing span), worth it for service members and combinator callbacks that should be attributable in error reports. All forms re-run their body per execution. See "Effect.gen vs Effect.fn" in core-patterns.
  • Define services with Context.Service and an explicit static readonly Default/layer layer built with Layer.succeed/Layer.effect/Layer.provide. V4 does not generate a layer for you.
  • Model expected failures with Schema.TaggedError (or a plain Data.TaggedError when no Schema fields are needed) and recover with Effect.catchTag/catchTags/Match, never manual _tag string comparisons.
  • Wrap fallible Promises with Effect.tryPromise({ try, catch }); Effect.promise turns rejection into a defect. No async/await or try/catch inside Effect workflows — ESLint bans them in ts/packages/cli/src.
  • Treat every remembered v3 package name and API as wrong until verified against ts/vendor/effect (read-only source oracle — never edit or import from it) and the installed effect@4.0.0-rc.117 typings. Source may be ahead of the published package; the compiler is the compatibility gate.

Verification

pnpm typecheck
pnpm --filter @composio/cli test

Run pnpm validate:agent-skills and pnpm validate:skill-routing after editing this skill or its descriptions, and compile the TypeScript blocks in this skill and in typescript-testing/references/effect-v4-cli.md against the pinned packages with:

node .agents/skills/effect-v4/scripts/check-examples.mjs

Blocks that quote repo files with unresolvable imports carry a no-check fence info string.

Signals

GitHub stars
30k
Forks
5k
Last commit
Oct 2026

ahel review

  • K1binfo
    installs-packages (in references/upgrade-workflow.md)

Automated review, not a security audit. Ruleset v1+k2.

Questions

What version of Effect does this skill target?
It is pinned exactly to effect@4.0.0-rc.117. The pattern references, rename table, and source oracle all match that release candidate.
Does it cover the effect/unstable/cli command surface?
Yes. The skill covers building commands on the effect/unstable/cli surface, along with Context.Service, explicit layers, and Schema.TaggedError.
Can it help upgrade existing Effect v3 code?
Yes. It includes a v3-to-v4 rename table and verification steps, so the agent can upgrade code and check it with pnpm typecheck and example compilation.
Advanced
Item type
skill
Key
effect-v4
Source
github.com/composiohq/composio