# effect-ts

Skill for working with Effect-TS, a functional programming library for TypeScript. Guides you through type-safe code with error handling, async operations, and resource management using Effect, Schema, Pattern Matching, and Context.Tag.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 264 installs · ★ 655 repo stars
- Author: pedronauck
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pedronauck/skills/tree/HEAD/skills/curated/effect-ts/SKILL.md
- Updated: 2026-10-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/pedronauck-effect-ts

## What it does

The skill includes reference guides on Effect fundamentals (Effect.gen, pipe, Effect.fn), data modeling via Schema, error handling with Data.TaggedError, mandatory Pattern Matching for tagged unions, data types (Option, Either, Duration, DateTime, BigDecimal, Chunk, HashSet, Redacted), and the Context.Tag service pattern. Contains testing rules with @effect/vitest and a list of forbidden patterns (try-catch inside Effect.gen, type assertions, switch on _tag instead of Match).

References include concrete code examples for each topic: building Effects, working with streams (Stream, Sink, batching, caching), concurrency and finalizers, logging and tracing via HttpApi, test isolation. The skill assumes you already know TypeScript and async; it applies Effect to your project rather than teaching the library from scratch.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pedronauck/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 pedronauck/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 pedronauck/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 pedronauck/skills skills/curated/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 pedronauck/skills --skill effect-ts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pedronauck/skills --path skills/curated/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 pedronauck/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/pedronauck/skills/tree/HEAD/skills/curated/effect-ts/SKILL.md

## When to use it
- Write type-safe async code without try-catch and undefined
- Model and validate data using Schema
- Handle errors while preserving type information across operations
- Branch on tagged unions without losing exhaustiveness checking
- Manage services and dependencies through Context.Tag and Layer

## Example prompts
- Write a function to fetch a user with error types via Effect, using the Context.Tag pattern
- Show how to apply Schema.transform and Schema.filter for JSON validation in a request handler
- Help refactor existing code from try-catch to Effect.gen with proper error handling

## Similar
- [effect-best-practices](https://affpapa.org/en/nevibecode/skills/effect-best-practices.md) — skill · 844 installs
- [design](https://affpapa.org/en/nevibecode/skills/design-3.md) — skill · ★ 26 repo stars
- [ax-add-ingest-stage](https://affpapa.org/en/nevibecode/skills/ax-add-ingest-stage.md) — skill · ★ 124 repo stars
- [effect](https://affpapa.org/en/nevibecode/skills/effect.md) — skill · 2900 installs
- [functional](https://affpapa.org/en/nevibecode/skills/functional.md) — skill · 1 install
- [0-error-handling](https://affpapa.org/en/nevibecode/rules/0-error-handling.md) — rule · ★ 571 repo stars

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

From the same set: [pedronauck/skills](https://affpapa.org/en/nevibecode/by/pedronauck/skills.md) — 52 cards

---
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
