mepuka/effect-ontology · Archived

effect-concurrency-fibers

Concurrency with Effect.all, forEach concurrency, Fiber lifecycle, race and timeouts. Use for parallelizing tasks safely.

First seen Jan 23, 2026

Installation

$ npx skills add mepuka/effect-ontology --skill effect-concurrency-fibers

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from mepuka/effect-ontology · top by installs.

npx skills add mepuka/effect-ontology

Browse all from mepuka/effect-ontology

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 5
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Grep, Glob, Edit, Write, mcp__effect-docs__effect_docs_search
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,989 B
  • docs SUMMARY.md 154 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 41 installs

SKILL.md

Concurrency & Fibers

When to use

  • Parallelizing independent work safely with limits
  • Coordinating background tasks and lifecycle
  • Racing operations for latency control

Parallel Patterns

const results = yield* Effect.all(tasks, { concurrency: 10 })
const processed = yield* Effect.forEach(items, processItem, { concurrency: 5 })

Fiber Lifecycle

const fiber = yield* Effect.fork(work)
const value = yield* Fiber.join(fiber)
yield* Fiber.interrupt(fiber)

Racing / Timeouts

const fastest = yield* Effect.race(slow, fast)
const withTimeout = yield* Effect.timeout(operation, "5 seconds")

Guidance

  • Limit concurrency to protect resources
  • Use fork for background loops; always manage interruption
  • Prefer Effect.all for independent operations

- Use Effect.forEach with concurrency for pools - Combine with retries and timeouts for resilient parallelism

Pitfalls

  • Unbounded concurrency can exhaust CPU/IO or hit rate limits
  • Always interrupt background fibers on shutdown
  • Don’t block inside fibers; keep work asynchronous/effectful

Cross-links

Local Source Reference

CRITICAL: Search local Effect source before implementing

The full Effect source code is available at docs/effect-source/. Always search the actual implementation before writing Effect code.

Key Source Files

  • Effect: docs/effect-source/effect/src/Effect.ts
  • Fiber: docs/effect-source/effect/src/Fiber.ts
  • Duration: docs/effect-source/effect/src/Duration.ts

Example Searches

# Find Effect.all and concurrency patterns
grep -F "Effect.all" docs/effect-source/effect/src/Effect.ts

# Find forEach with concurrency
grep -rF "forEach" docs/effect-source/effect/src/ | grep -F "concurrency"

# Study Fiber lifecycle operations
grep -F "export" docs/effect-source/effect/src/Fiber.ts | grep -E "fork|join|interrupt"

# Find race and timeout implementations
grep -F "race" docs/effect-source/effect/src/Effect.ts
grep -F "timeout" docs/effect-source/effect/src/Effect.ts

Workflow

  1. Identify the concurrency API you need (e.g., Effect.all, fork)
  2. Search docs/effect-source/effect/src/Effect.ts for the implementation
  3. Study the types and concurrency options
  4. Look at test files for usage examples
  5. Write your code based on real implementations

Real source code > documentation > assumptions

References