effect-v4
Skill1 starsChanged 15 days agoMITView on GitHub
Writing idiomatic Effect 4 code in this repo — services, layers, schemas, errors, HttpClient, McpServer, testing — and the API renames that differ from Effect 3 and from most training data. Use whenever editing TypeScript under packages/.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- ComposioHQ/composiotheir own version, first seen Nov 5, 2026
- cill-i-am/skillstheir own version, first seen Nov 1, 2026
- peterpme/skillstheir own version, first seen Nov 1, 2026
- anis-dr/skillstheir own version, first seen Oct 15, 2026
- zhe-qi/clhoria-templatetheir own version, first seen Oct 8, 2026
- tunnckoCore/skillstheir own version, first seen May 31, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- ComposioHQ/composio★ 31ksame name
- zhe-qi/clhoria-template★ 193same name
- peterpme/skills★ 28same name
- anis-dr/skills★ 3same name
- gmdotdev/skills★ 2same name
- tunnckoCore/skills★ 2same name
- cill-i-am/skills★ 1same name
- theseus-run/theseus★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Files
Effect 4 in tipee-tools
This repo pins effect exactly (and @effect/platform-node,
@effect/vitest, @effect/openapi-generator with it; see
packages/core/package.json). v4 renamed and merged a lot; most
model training data describes v3. Read the installed sources, not memory:
packages/core/node_modules/effect/src/<Module>.ts (JSDoc with examples on
every export; pnpm links effect into each package, not the root), and
Effect's own agent docs shipped beside them:
packages/core/node_modules/effect/AGENTS.md and
packages/core/node_modules/effect/ai-docs/.
Conventions (from Effect's AGENTS.md, applied here)
Effect.gen(function* () { … })inline;Effect.fn("Name.method")(function* (…) { … })for reusable functions (the string becomes the span name). Never wrap a bareEffect.genin a function just to name it.- Services:
class X extends Context.Service<X, { … }>()("@tipee-tools/core/X") {}withstatic readonly layer = Layer.effect(X, Effect.gen(…))returningX.of({ … }). Config-driven layers useLayer.unwrap(seeTipeeClient.layerConfig). - Errors:
class E extends Schema.TaggedError<E>()("E", { fields })with anoverride get message()that says what to do. One umbrella error with a taggedreasonfield (TipeeError) so callers useEffect.catchReason. Fail withreturn yield* new E(…), neverthrow. - Schemas:
Schema.Struct,Schema.Class<T>("id")({ … })for named entities,Schema.String.check(Schema.isPattern(re)),Schema.NullOr,Schema.optionalKeyfor optional JSON keys,Schema.Literals([…]),Schema.Union([…]). Decoding strips unknown keys by default. Types:typeof S.Type. Descriptions via.annotate({ description })(they reach the MCP JSON Schema). - HttpClient (
effect/http): takeyield* HttpClient.HttpClient, shape it withHttpClient.mapRequest(flow(acceptJson, bearerToken, setHeader)), timeouts and retries withHttpClient.transformResponse(Effect.repeaton transient responses,Effect.retryon errors; notretryTransient, which would resend writes; seeretriedinTipeeClient.ts), and hand it toHttpApiClient.makeWith(api, { baseUrl, httpClient }); decode a plain response withHttpClientResponse.schemaJson(schema). ProvideFetchHttpClient.layer(MSW intercepts it in tests). - MCP (
effect/ai):Tool.make(name, { description, parameters, success, failure }).annotate(Tool.Readonly, true),Toolkit.make(...), handlers withtoolkit.toLayer(Effect.gen(…)), server withMcpServer.toolkit(toolkit)(hereMcpServer.registerToolkitunder a wrappedaddTool, to append a text block to answers:Notice.ts) providedMcpServer.layerStdio({ name, version, protocols: [McpProtocol.v2025_11_25, …] })andNodeStdio.layer. Entry point:NodeRuntime.runMain(Layer.launch(layer)), the effect wrapped inEffect.provideService(Logger.LogToStderr, true)and logging its own failure, with{ disableErrorReporting: true }: stdout is the protocol channel, and a failed start must not land there (seestartinpackages/mcp/src/Start.ts). A declaredfailureschema makes the MCP result carryerror.message. - Tests:
import { it, layer } from "@effect/vitest";layer(L)("suite", (it) => …)shares a layer;it.effectruns on theTestClock(fork withEffect.forkChild,TestClock.adjust,Fiber.jointo drive retries; when the effect also waits on real I/O such as MSW, step the clock in a loop instead, assettledinpackages/core/test/answers.tsdoes);Effect.flipto get the error.
v4 renames and gotchas met in this repo
| Looking for (v3 / memory) | In v4 |
Context.Tag, Effect.Service, ServiceMap.Service | Context.Service<Self, Shape>()("id") |
Effect.fork, forkDaemon | Effect.forkChild, Effect.forkDetach |
Config.string, Config.redacted | Config.String, Config.Redacted (capitalised) |
Schema.filter, Schema.pattern | Schema.String.check(Schema.isPattern(re)) |
Schema.optional (key may be absent) | Schema.optionalKey (optional also allows undefined) |
Schema.Schema.Any as a generic bound | Schema.Constraint; for decodeUnknownSync use Schema.ConstraintDecoder<unknown> |
ParseResult.TreeFormatter | error.message on SchemaError already formats the issue |
HttpClientResponse.isOk | compare response.status yourself, or HttpClient.filterStatusOk |
@effect/platform imports | effect/http, effect/ai; Node bits from @effect/platform-node |
Effect.fork in it.effect without adjusting the clock | nothing happens: TestClock starts at the epoch and never advances on its own |
Since 4.0.0-rc.118 the former effect/unstable/* modules live at the top level
(effect/http, effect/http-api, effect/ai, effect/cli, …) but are still
marked @stability unstable and may break in a minor release; Schema,
Config, Layer, Effect are stable. The tsconfigs turn off the
unstableApiUsage diagnostic because depending on them is deliberate.
Renovate moves effect and the @effect/* packages (except @effect/tsgo)
together as one group; read that PR's diff and rerun pnpm verify before
merging.
Type-checking and diagnostics
TypeScript 7 is the native compiler. @effect/tsgo is installed at the root
and patched into typescript and oxlint-tsgolint by the prepare script,
so pnpm check, pnpm lint and the editor (VS Code with the TypeScript 7
extension, see .vscode/settings.json) all surface Effect diagnostics.
pnpm exec effect-tsgo diagnostics --project <tsconfig> --strict prints them
on their own. Do not add @effect/language-service: it is the pre-7 plugin
(the plugins entries in the tsconfigs carry that name only because it is
the name @effect/tsgo reads).
Lint
oxlint.config.ts documents every rule relaxed for Effect (capitalised
constructors, anonymous generators, _tag, one-letter type parameters,
Array<T>, PascalCase module files). Don't fight the rules with disable
comments; add a commented entry there instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

