agentCLAWHUBUnverified

effect-ts

Effect-TS guide for TypeScript, v4 default with v3 support. Use when writing, debugging, or reviewing Effect code across errors, concurrency, services, streams, and schema, or when code imports from 'effect' or any '@effect/*' package. Skill: effect-ts Owner: tenequm Summary: Effect-TS guide for TypeScript, v4 default with v3 support. Use when writing, debugging, or reviewing Effect code across errors, concurrency, services, streams, and schema, or when code imports from 'effect' or any '@effect/*' package. Tags: latest:0.6.5 Version history: v0.6.5 | 2026-09-09T09:52:11.528Z | user Updated effect-ts from 0.6.4 to 0.6.5. Changes: - modified CHANGEL

OpenClaw

Rank

62

Safety

84

Downloads

2.3k

Updated

Oct 9, 2026

Version

0.6.5

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2.3K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 9, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 9, 2026
Adoption signal
2.3K downloadsadoption · observed Oct 9, 2026
Latest release
0.6.5release · observed Sep 9, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17bp3v1hm1dnkzey0c9tfh02183j0y5:effect-ts
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-effect-ts/snapshot"

Documentation

CLAWHUB

154,366 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: effect-ts
description: Effect-TS guide for TypeScript, v4 default with v3 support. Use when writing, debugging, or reviewing Effect code across errors, concurrency, services, streams, and schema, or when code imports from 'effect' or any '@effect/*' package.
metadata:
  version: "0.6.5"
  categories: "development"
  topics: "effect, typescript, functional-programming, concurrency, error-handling"
  upstream: "[email protected]"
  openclaw:
    homepage: https://github.com/tenequm/skills/tree/main/skills/effect-ts
    emoji: "🌀"
    envVars:
      - name: OPENAI_API_KEY
        required: false
        description: OpenAI API key for Effect AI examples using the OpenAI provider.
---

# Effect-TS

Effect is a TypeScript library for building production-grade software with typed errors, structured concurrency, dependency injection, and built-in observability.

## Version Detection

Before writing Effect code, detect which version the user is on:

```bash
# Check installed version
cat package.json | grep '"effect"'
```

- **v4.x** (recommended, the direction Effect is heading): `Context.Service`, `Effect.catch`, `Effect.forkChild`, `Schema.TaggedErrorClass`
- **v3.x** (stable, still common in production): `Context.Tag`, `Effect.catchAll`, `Effect.fork`, `Data.TaggedError`

> Note: v4 beta briefly used a `ServiceMap` module, renamed back to `Context` on 2026-04-07 (PR #1961). If you see `ServiceMap.*` in any doc or older beta code, it is the current `Context.*`. Both v3 and v4 import `Context` from `"effect"`; the exports inside differ (`Context.Service` in v4 vs `Context.Tag` in v3).

**Prefer v4 for new projects** - it's where Effect is going. In an existing codebase, match the installed version: don't rewrite v3 code in v4 syntax unless asked. If the version is genuinely unclear, default to v4 and say so. v4 is still in beta, so pin an exact version (`4.0.0-beta.x`) and expect occasional API churn.

## Primary Documentation Sources

**v4 (primary):**
- https://github.com/Effect-TS/effect-smol (v4 source + migration guides)
- https://github.com/Effect-TS/effect-smol/blob/main/LLMS.md (v4 LLM guide)

**v3 (for existing codebases):**
- https://effect.website/docs (v3 stable docs)
- https://effect.website/llms.txt (LLM topic index)
- https://effect.website/llms-full.txt (full docs for large context)

**Both versions:**
- https://tim-smart.github.io/effect-io-ai/ (concise API list)

## AI Guardrails: Critical Corrections

LLM outputs frequently contain incorrect Effect APIs. Verify every API against the reference docs before using it.

**Common hallucinations (both versions):**

| Wrong (AI often generates)                   | Correct                                                       |
|----------------------------------------------|---------------------------------------------------------------|
| `Effect.cachedWithTTL(...)`                  | `Cache.make({ capacity, timeToLive, lookup })`                |
| `Effect.cachedInvalidateWith

_meta.json

{
  "ownerId": "kn76gpsgjw5chv0xvzbzcb8cxn81x46r",
  "slug": "effect-ts",
  "version": "0.6.5",
  "publishedAt": 1788947531528
}

references/cli.md

# CLI

`effect/unstable/cli` builds command-line apps where handlers are Effects — flags and arguments are parsed and typed, and the whole program runs through the Effect runtime. (Unstable module, `@since 4.0.0`.)

```typescript
import { Command, Flag, Argument } from "effect/unstable/cli"
```

## A Minimal Command

```typescript
import { Console, Effect } from "effect"
import { Command, Flag } from "effect/unstable/cli"
import { NodeRuntime, NodeServices } from "@effect/platform-node"

const greet = Command.make(
  "greet",
  {
    name: Flag.string("name"),
    loud: Flag.boolean("loud")
  },
  (config) =>
    Effect.gen(function*() {
      const msg = `Hello, ${config.name}!`
      yield* Console.log(config.loud ? msg.toUpperCase() : msg)
    })
)

Command.run(greet, { version: "1.0.0" }).pipe(
  Effect.provide(NodeServices.layer),
  NodeRuntime.runMain
)
```

`Command.make(name, config?, handler?)` — `config` maps option names to `Flag.*` / `Argument.*` params (and can nest: `server: { host, port }`); the handler receives the parsed, typed values and returns an Effect.

> `Command.run` takes `{ version }` only — the command's name comes from the command itself, **not** a `{ name, version }` object. Use `Command.runWith(command, { version })(argv)` to pass args explicitly.

## Flags and Arguments

```typescript
const port = Flag.integer("port").pipe(Flag.withDefault(3000))
const verbose = Flag.boolean("verbose").pipe(Flag.withAlias("v"))
const config = Flag.file("config").pipe(Flag.optional)
const env = Flag.choice("env", ["dev", "prod"])

const file = Argument.string("file")
const rest = Argument.variadic(Argument.string("paths"))
```

`Flag.*` constructors: `string`, `boolean`, `integer`, `float`, `date`, `choice`, `path` / `file` / `directory`, `redacted`, `fileText` / `fileParse` / `fileSchema`, `keyValuePair`. Modifiers: `withDefault`, `withAlias`, `withDescription`, `optional`. `Argument.*` mirrors these and adds `Argument.variadic`. Both are built on the shared `Param` layer.

## Subcommands

```typescript
const root = Command.make("mytool").pipe(
  Command.withSubcommands([greet, otherCommand])
)
```

`Command.run` / `runWith` require the `FileSystem | Path | Terminal | ...` environment, all provided by `NodeServices.layer`; finish with `NodeRuntime.runMain` so SIGINT is handled.

references/concurrency.md

# Concurrency

Effect uses fiber-based structured concurrency. Fibers are lightweight virtual threads managed by the Effect runtime.

## Forking Fibers

### v3

```typescript
import { Effect, Fiber } from "effect"

// Fork as child (interrupted when parent ends)
const fiber = yield* Effect.fork(myEffect)

// Fork as daemon (outlives parent)
const fiber = yield* Effect.forkDaemon(longRunning)

// Fork tied to a Scope
const fiber = yield* Effect.forkScoped(background)
```

### v4

```typescript
import { Effect, Fiber } from "effect"

// Fork as child
const fiber = yield* Effect.forkChild(myEffect)

// Fork detached (outlives parent)
const fiber = yield* Effect.forkDetach(longRunning)

// Fork tied to a Scope (unchanged)
const fiber = yield* Effect.forkScoped(background)

// New options
const fiber = yield* Effect.forkChild(myEffect, {
  startImmediately: true,   // begin executing immediately
  uninterruptible: true     // cannot be interrupted
})
```

> **`forkDetach` parents to the global scope**, so the fiber survives even `runtime.dispose()` on a `ManagedRuntime`. For a background fiber (a poller, a subscriber) that must die when its runtime is torn down, use `Effect.forkScoped` inside the runtime's scope instead — `forkDetach` there leaks the fiber past disposal.

## Joining and Interrupting

```typescript
// Wait for a fiber to complete
const result = yield* Fiber.join(fiber)

// Interrupt a fiber
yield* Fiber.interrupt(fiber)

// v4: Fiber is NOT an Effect - must use Fiber.join explicitly
// v3: yield* fiber was allowed (Fiber was an Effect subtype)
```

## Parallel Execution

```typescript
// Process items with bounded concurrency
const results = yield* Effect.all(
  items.map((item) => processItem(item)),
  { concurrency: 5 }
)

// forEach variant
const results = yield* Effect.forEach(
  items,
  (item) => processItem(item),
  { concurrency: 10 }
)
```

## Racing

```typescript
// First to succeed wins, loser is interrupted
const result = yield* Effect.race(fetchFromCache, fetchFromDb)

// Race multiple effects
const result = yield* Effect.raceAll([
  fetchFromCdn1,
  fetchFromCdn2,
  fetchFromCdn3
])
```

## Interruption

Interruption is cooperative, not preemptive. Fibers check for interruption at yield points.

```typescript
// Register cleanup on interruption
const withCleanup = myEffect.pipe(
  Effect.onInterrupt(() => Effect.log("Interrupted! Cleaning up..."))
)

// Make a region uninterruptible
const critical = Effect.uninterruptible(
  Effect.gen(function*() {
    yield* beginTransaction()
    yield* doWork()
    yield* commitTransaction()
  })
)

// Interruptible region inside an uninterruptible one
const mixed = Effect.uninterruptible(
  Effect.gen(function*() {
    yield* criticalSetup()
    yield* Effect.interruptible(longComputation)
    yield* criticalTeardown()
  })
)
```

## Queue

Bounded queues provide back-pressure; dropping/sliding queues do not.

```typescript
import { Queue } from "effect"

// Bounded queue (back-pres

references/configuration.md

# Configuration (Config / ConfigProvider)

Effect's `Config` module reads configuration (env vars by default) as typed, validated values inside the type system. A `Config<T>` *is* an `Effect<T, ConfigError>`, so you consume it with `yield*` and it resolves against the `ConfigProvider` in the fiber's services. Always import from `"effect"`.

```typescript
import { Config, Effect } from "effect"
```

> v4 note: in v4 `Config` is schema-backed — every constructor delegates to `Config.schema`, and several constructors (`Config.schema`, `Config.int`, `Config.finite`, `Config.literals`) are `@since 4.0.0`. The consumption model (`yield* Config.string(...)`) is the same across v3 and v4.

## Reading Values

```typescript
const program = Effect.gen(function*() {
  const host = yield* Config.string("HOST")
  const port = yield* Config.port("PORT")            // validates 1-65535
  const debug = yield* Config.boolean("DEBUG")       // "true"/"yes"/"on"/"1" -> true
  const timeout = yield* Config.duration("TIMEOUT")  // "10 seconds" -> Duration
  const apiKey = yield* Config.redacted("API_KEY")   // Redacted<string> (won't print)
  return { host, port, debug, timeout, apiKey }
})
```

Common constructors: `Config.string`, `Config.nonEmptyString`, `Config.number`, `Config.int`, `Config.boolean`, `Config.duration`, `Config.port`, `Config.url`, `Config.date`, `Config.literal` / `Config.literals`, `Config.logLevel`, `Config.redacted`.

## Defaults, Optional, Nesting

```typescript
// Fall back to a default (only on MISSING data, not on validation failure)
const port = yield* Config.port("PORT").pipe(Config.withDefault(8080))

// Option<T> when absent
const proxy = yield* Config.option(Config.string("PROXY_URL"))

// Group related config and namespace it (reads DATABASE_HOST / DATABASE_PORT)
const db = yield* Config.all({
  host: Config.string("HOST"),
  port: Config.number("PORT")
}).pipe(Config.nested("DATABASE"))
```

`Config.all` accepts a struct (object) or a tuple/iterable of configs and combines them. `withDefault` / `option` only recover from *missing* data — a present-but-invalid value (wrong type, out of range) still fails with a `ConfigError`.

## Schema-Validated Config

`Config.schema` decodes raw config through an Effect `Schema`, giving full validation and transformation:

```typescript
import { Config, Schema } from "effect"

const AppConfig = Config.schema(
  Schema.Struct({ host: Schema.String, port: Schema.Int }),
  "APP"
)
```

## Providing a ConfigProvider

The default provider reads from `process.env`. Override it (tests, embedded config) by providing a `ConfigProvider` via its layer. There is **no `ConfigProvider.fromJson`** — use `ConfigProvider.fromUnknown(obj)` for an in-memory object or `ConfigProvider.fromEnv({ env })` for an explicit env map.

```typescript
import { Config, ConfigProvider, Effect, Layer } from "effect"

const TestConfig = ConfigProvider.layer(
  ConfigProvider.fromUnknown({ HOST: "localhost", PORT: "8080", DEBUG: "ye
Github ReposUpdated 6h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/tenequm/skills/effect-ts",
      "sourceUrl": "https://clawhub.ai/tenequm/skills/effect-ts",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T16:28:54.440Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-effect-ts/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-effect-ts/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-09T16:28:54.440Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "2.3K downloads",
      "href": "https://clawhub.ai/tenequm/effect-ts",
      "sourceUrl": "https://clawhub.ai/tenequm/effect-ts",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T16:28:54.440Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "0.6.5",
      "href": "https://clawhub.ai/tenequm/effect-ts",
      "sourceUrl": "https://clawhub.ai/tenequm/effect-ts",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-09T09:52:11.528Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-effect-ts/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-effect-ts/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 0.6.5",
      "description": "Updated effect-ts from 0.6.4 to 0.6.5. Changes: - modified `CHANGELOG.md` - modified `SKILL.md`",
      "href": "https://clawhub.ai/tenequm/effect-ts",
      "sourceUrl": "https://clawhub.ai/tenequm/effect-ts",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-09T09:52:11.528Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to effect-ts and adjacent AI workflows.