Back to Skills

effect-concurrency

verified

Use when Effect concurrency patterns including fibers, fork, join, parallel execution, and race conditions. Use for concurrent operations in Effect applications.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

effect

Framework

Repository

TheBushidoCollective/han
74stars

plugins/frameworks/effect/skills/effect-concurrency/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/plugins/frameworks/effect/skills/effect-concurrency/SKILL.md -a claude-code --skill effect-concurrency

Installation paths:

Claude
.claude/skills/effect-concurrency/
Powered by add-skill CLI

Instructions

# Effect Concurrency

Master concurrent execution in Effect using fibers. This skill covers forking,
joining, interruption, parallel execution, and advanced concurrency patterns for
building high-performance Effect applications.

## Fibers Fundamentals

### What are Fibers?

Fibers are lightweight virtual threads that execute effects concurrently:

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

// Every effect runs on a fiber
const effect = Effect.succeed(42)
// When run, this executes on a fiber

// Effects are descriptions - fibers are executions
// Effect: lazy, immutable description
// Fiber: running execution with state
```

### Forking Effects

Create independent concurrent fibers:

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

const task = Effect.gen(function* () {
  yield* Effect.sleep("1 second")
  yield* Effect.log("Task completed")
  return 42
})

const program = Effect.gen(function* () {
  // Fork creates a new fiber
  const fiber = yield* Effect.fork(task)
  // fiber: RuntimeFiber<number, never>

  yield* Effect.log("Main fiber continues")

  // Join waits for fiber to complete
  const result = yield* Fiber.join(fiber)
  yield* Effect.log(`Result: ${result}`)

  return result
})
```

### Fiber Operations

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

const program = Effect.gen(function* () {
  const fiber = yield* Effect.fork(longRunningTask)

  // Join - wait for result
  const result = yield* Fiber.join(fiber)

  // Await - get Exit value (success/failure/interruption)
  const exit = yield* Fiber.await(fiber)

  // Interrupt - cancel execution
  yield* Fiber.interrupt(fiber)

  // Poll - check if complete (non-blocking)
  const status = yield* Fiber.poll(fiber)
})
```

## Parallel Execution

### Effect.all - Run Multiple Effects

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

// Parallel execution (default)
const program = Effect.gen(function* () {
  const results = yield* Effect.all([
    fetchUser("1"),
    fetchUser("2"),
   

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
11141 chars