Index of every page on this site: llms.txt
All skills
composiohq avatar

/effect-v4

@85dab73
by Composiocomposiohq/composio31k stars
4,962
Run it yourself

Write, review, or upgrade Effect v4 code in the Composio CLI, cli-keyring, and json-schema-to-effect-schema packages, all using the matching range effect@^4.1.0 — Context.Service and explicit layers, Schema.TaggedError and typed recovery, the effect/cli command surface, and the vendored effect source oracle. Use when writing or reviewing Effect v4 code, answering a v4 API question, working in effect/cli, defining a Context.Service service, modeling an error with Schema.TaggedError, bumping the Effect pins, or verifying an unfamiliar API against ts/vendor/effect. Do not use for CLI command UX/wiring design (use cli-command) or CLI E2E tests (use cli-e2e).

Use this Skill: https://skilld.dev/gh/composiohq/composio/effect-v4

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈169 tokens for metadata: the name and description. ≈995 when used: this file. ≈7.6k more on demand in 4 files.

Description uses 8.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈674 characters, or 8.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Effect v4

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

Version matrix

effect, @effect/platform-bun, and @effect/vitest use the same range ^4.1.0; keep their lockfile resolutions aligned. Do not use @next or mismatched versions across packages. @effect/cli and @effect/platform no longer exist as dependencies; their surfaces are consolidated into effect and effect/*. See versions.json for the exact example-check matrix (also typescript, vitest).

Read next

  • references/core-patterns.md — services, layers, typed errors, Schema, choosing between Effect.gen and Effect.fn, Option combinators in place of isSome ternaries, driving time in tests with TestClock (fork, adjust until the fiber settles, join) instead of it.live, and the v3→v4 rename table (labeled historical, for recognizing stale patterns).
  • references/cli-surface.md — effect/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 release.

References label source excerpts and standalone framework examples separately. Repo-linked excerpts name the file checked by validate:cli-skills. The cited source remains authoritative when an excerpt or explanation disagrees with the implementation.

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. oxlint rejects try/catch in ts/packages/cli/src. Nothing lints async/await, so review catches it.
  • 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.1.0 typings. Source may be ahead of the published package; the compiler is the compatibility gate.

Verification

pnpm typecheck
pnpm --filter @composio/cli run lint:effect
pnpm --filter @composio/cli test

Run bun run validate:agent-skills and bun run 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.

bun run validate:cli-skills also verifies repo-linked command examples, their native Effect client requests, and the selected invocation contracts in Agent Substrate CI. Standalone snippet compilation and routing probes alone do not certify command behavior or agent task performance.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides documentation and verification tools for Effect v4 patterns. It includes a utility script that validates code examples by installing necessary dependencies from the official npm registry and running the TypeScript compiler. No malicious behaviors were detected.

  • Socket6d

    No alerts

  • Snyk2d

    Risk: MEDIUM · 1 issue

Signed by skilld at 85dab73. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago

README badge

README badge for composiohq/composio/effect-v4