# effect-ts

Gives the agent ground rules for Effect v4 code: services, layers, schemas and errors. Useful once a project already depends on effect.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 43
- Author: joelhooks
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/joelhooks/effectts-skills/tree/HEAD/skills/effect-ts/SKILL.md
- Updated: 2026-05-20
- HTML: https://affpapa.org/en/nevibecode/skills/joelhooks-effect-ts

## What it does

The skill loads a set of rules and examples the agent reads before touching Effect code. It covers patterns from effect-solutions and the library source: `Effect.gen` for straight-line composition, `Effect.fn` for traced service methods, `ServiceMap.Service` with a typed `Layer`, `Schema.Class` and branded primitives for domain records, `Schema.TaggedErrorClass` for errors you raise with `yield*`.

The central rule is to stop trusting memory. The agent checks for a shallow source mirror in `.agent-sources/effect/` and clones the repository there when it is missing. Skip that step and recent v4 APIs such as `effect/unstable/http` and `effect/unstable/cli` have nowhere to come from.

Keep the mirror out of product commits. The skill suggests `.git/info/exclude` rather than the shared `.gitignore`. It also lists local paths to effect-solutions and the Effect monorepo on the author's machine; you likely have neither, so the cloned mirror is what matters. A separate `effect_source` tool is mentioned for `status`, `hydrate` and `search`, with plain `grep` as the fallback.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add joelhooks/effectts-skills --skill effect-ts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/effect-ts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/effect-ts/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add joelhooks/effectts-skills --skill effect-ts -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/effect-ts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add joelhooks/effectts-skills --skill effect-ts -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/effect-ts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install joelhooks/effectts-skills effect-ts
```

2. **Manually: put the files in place**
- File: `.github/skills/effect-ts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add joelhooks/effectts-skills --skill effect-ts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/joelhooks/effectts-skills --path skills/effect-ts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/effect-ts/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add joelhooks/effectts-skills --skill effect-ts -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/joelhooks/effectts-skills/tree/HEAD/skills/effect-ts/SKILL.md

## When to use it
- Port existing code to the Effect v4 API
- Define a service with `ServiceMap.Service` and wire its `Layer`
- Model a domain record on `Schema.Class` with branded IDs
- Turn thrown failures into tagged errors caught by `catchTag`
- Pull current examples from library source before a refactor

## Example prompts
- Add a `Users` service with `ServiceMap.Service` and a layer over the Effect HTTP client
- Make `UserId` a branded type and define a `User` class on `Schema.Class`
- Rewrite the failure in `getUser` as a `Schema.TaggedErrorClass`

## Similar
- [migrate-to-shoehorn](https://affpapa.org/en/nevibecode/skills/migrate-to-shoehorn.md) — skill · 475388 installs
- [write-swift](https://affpapa.org/en/nevibecode/skills/write-swift.md) — skill · 119300 installs
- [megacave](https://affpapa.org/en/nevibecode/skills/megacave.md) — skill · 25400 installs
- [find-docs](https://affpapa.org/en/nevibecode/skills/find-docs.md) — skill · 9400 installs
- [typescript-advanced-types](https://affpapa.org/en/nevibecode/skills/typescript-advanced-types.md) — skill · 92169 installs
- [smart-explore](https://affpapa.org/en/nevibecode/skills/smart-explore.md) — skill · 7300 installs

## Other versions with the same name
- [effect-ts · effect-ts](https://affpapa.org/en/nevibecode/skills/effect-ts.md) — 7900 installs
- [effect-ts · paulrberg](https://affpapa.org/en/nevibecode/skills/paulrberg-effect-ts.md) — 3100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
