effect-parallelization

Run Effect computations concurrently with combinators, racing, and coordination primitives.

3|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/mpsuesser/opencode-effect-enforcer --skill effect-parallelization-mpsuesser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-parallelization
Source: https://github.com/mpsuesser/opencode-effect-enforcer/tree/main/skills/effect-parallelization
Command: npx skills add https://github.com/mpsuesser/opencode-effect-enforcer --skill effect-parallelization-mpsuesser

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires effect.

What problem does it solve? Effect's collection combinators run sequentially by default, and its concurrency APIs differ substantially from v3 and from common training data, so agents frequently write sequential code, use wrong option keys, or misuse semaphores and latches. This Skill provides verified guidance for declarative concurrency in Effect v4. ## Core Features & Use Cases - Bounded fan-out: Use Effect.all and Effect.forEach with explicit concurrency options, discard, and mode: 'result' for per-item outcomes without fail-fast interruption. - Racing and timeouts: Choose between race/raceAll (first success) and raceFirst/raceAllFirst (first completion), plus firstSuccessOf for sequential fallback and timeout combinators. - Coordination primitives: Apply Semaphore for global rate limits, PartitionedSemaphore for per-key round-robin fairness, and Latch for gating fibers on startup signals. - Use Case: Sync thousands of users against an external API that allows only 5 in-flight requests by wrapping calls in a service-held Semaphore while fanning out with Effect.forEach at unbounded concurrency. ## Quick Start Ask the agent to fetch a list of user IDs concurrently with a limit of 8 in flight using Effect.forEach, collecting per-item failures with Effect.partition.

Frequently Asked Questions about effect-parallelization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Effect.forEach concurrently in Effect v4?

Pass a concurrency option to Effect.forEach, such as { concurrency: 8 } for a bounded window or { concurrency: 'unbounded' } to start all effects at once. Without the option, iteration is sequential, which is the default for all collection combinators.

What is the difference between Effect.race and Effect.raceFirst?

Effect.race and raceAll wait for the first success, ignoring failures until one effect succeeds or all fail. Effect.raceFirst and raceAllFirst settle on the first completion, so a fast failure wins and fails the whole race.

Does Effect.all run in parallel by default?

No, Effect.all runs sequentially unless you pass a concurrency option. Use { concurrency: n } or { concurrency: 'unbounded' }, and note that Effect.zip uses a different key, { concurrent: true }.

How do I limit concurrent requests to an external API in Effect?

Create a Semaphore with Semaphore.make(n) inside the service layer and wrap each call with sem.withPermit(effect). This bounds access across all call sites and fibers, unlike a concurrency option which only bounds one combinator call.

Why did Effect.makeSemaphore stop working after upgrading to v4?

Effect.makeSemaphore and Effect.makeLatch were removed in v4. Use Semaphore.make(n) and Latch.make(open?) from their own modules, both importable from the 'effect' barrel.

When should I use Stream instead of Effect.forEach for concurrency?

Use Stream.mapEffect with a concurrency option when the source is unbounded, infinite, or too large to materialize, since Effect.forEach collects the entire iterable into an array. Streams also provide backpressure for pipelines over time.