effect-concurrency-fibers

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

16 stars

Best use case

effect-concurrency-fibers is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using effect-concurrency-fibers should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/effect-concurrency-fibers/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/effect-concurrency-fibers/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/effect-concurrency-fibers/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How effect-concurrency-fibers Compares

Feature / Agenteffect-concurrency-fibersStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Concurrency & Fibers

## When to use
- Parallelizing independent work safely with limits
- Coordinating background tasks and lifecycle
- Racing operations for latency control

## Parallel Patterns
```ts
const results = yield* Effect.all(tasks, { concurrency: 10 })
```

```ts
const processed = yield* Effect.forEach(items, processItem, { concurrency: 5 })
```

## Fiber Lifecycle
```ts
const fiber = yield* Effect.fork(work)
const value = yield* Fiber.join(fiber)
yield* Fiber.interrupt(fiber)
```

## Racing / Timeouts
```ts
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
- Errors & Retries: backoff + jitter for transient failures
- Streams & Pipelines: concurrent map over streams
- EffectPatterns inspiration: https://github.com/PaulJPhilp/EffectPatterns

## 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
```bash
# 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
- Agent Skills overview: https://www.anthropic.com/news/skills
- Skills guide: https://docs.claude.com/en/docs/claude-code/skills

Related Skills

125-java-concurrency

16
from diegosouzapw/awesome-omni-skill

Use when you need to apply Java concurrency best practices — including thread safety fundamentals, ExecutorService thread pool management, concurrent design patterns like Producer-Consumer, asynchronous programming with CompletableFuture, immutability and safe publication, deadlock avoidance, virtual threads and structured concurrency, scoped values, backpressure, cancellation discipline, and observability for concurrent systems. Part of the skills-for-java project

aesthetic-usability-effect

16
from diegosouzapw/awesome-omni-skill

Los diseños atractivos se perciben como más usables. Use cuando justifique inversión en diseño visual, diseñe primeras impresiones, o maneje errores.

Advanced Effect Di Environment

16
from diegosouzapw/awesome-omni-skill

Model dependencies using Effect-style Context, Layer, and Service patterns with compile-time safety. Use when designing DI systems, modeling environments, or building Effect-TS applications.

ai-image-effects

16
from diegosouzapw/awesome-omni-skill

Apply AI visual effects including Illusion Diffusion ($0.006), FLUX Fill Pro accessory replacement ($0.05), and SAM object detection (<$0.01). Use when adding AI effects, replacing image elements, detecting objects, or applying visual transformations.

GroundEffect

16
from diegosouzapw/awesome-omni-skill

Use this skill when the user asks about email, calendar, or Gmail/Google Calendar management via GroundEffect CLI. Triggers include "search my email", "list recent emails", "check my calendar", "what's on my calendar", "show my meetings", "calendar tomorrow", "calendar next week", "create a calendar event", "manage groundeffect accounts", "sync status", "start the daemon", "groundeffect", "groundeffect command", "draft email", "save draft", "save as draft", "create draft", "send email".

care-program-effectiveness

16
from diegosouzapw/awesome-omni-skill

Measure the clinical, utilization, and financial impact of care management programs and population health interventions. Use when evaluating program outcomes, conducting pre/post analyses, comparing intervention cohorts, or reporting program ROI to stakeholders.

anchoring-effect

16
from diegosouzapw/awesome-omni-skill

La primera información recibida influye en juicios posteriores. Use cuando diseñe pricing, comparaciones, o cualquier contexto donde el orden de información importa.

after-effects

16
from diegosouzapw/awesome-omni-skill

Use when implementing Disney's 12 animation principles in Adobe After Effects

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

acc-create-bulkhead

16
from diegosouzapw/awesome-omni-skill

Generates Bulkhead pattern for PHP 8.5. Creates resource isolation with semaphore-based concurrency limiting and thread pool isolation. Includes unit tests.

acc-create-anti-corruption-layer

16
from diegosouzapw/awesome-omni-skill

Generates DDD Anti-Corruption Layer for PHP 8.5. Creates translation layer between bounded contexts or external systems. Includes adapters, translators, facades, and unit tests.

acc-create-action

16
from diegosouzapw/awesome-omni-skill

Generates ADR Action classes for PHP 8.5. Creates single-responsibility HTTP endpoint handlers with PSR-7 support. Includes unit tests.