effect-concurrency-testing

Test Effect-TS concurrency primitives with deterministic synchronization patterns.

68|13|Updated Aug 9, 2025
One-click install
npx skills add https://github.com/kriegcloud/beep-effect --skill effect-concurrency-testing-kriegcloud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-concurrency-testing
Source: https://github.com/kriegcloud/beep-effect/tree/main/.claude/skills/effect-concurrency-testing
Command: npx skills add https://github.com/kriegcloud/beep-effect --skill effect-concurrency-testing-kriegcloud

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and correctly implement Effect's concurrency primitives, preventing common race conditions and ensuring reliable asynchronous behavior in Effect-TS applications.

Core Features & Use Cases

  • Concurrency Primitive Patterns: Demonstrates correct usage of PubSub, Deferred, Latch, Fiber coordination, SubscriptionRef, and Stream for testing.
  • Deterministic Testing: Provides patterns for writing reliable, non-flaky tests for concurrent code.
  • Use Case: Debugging a system where multiple fibers are publishing events to a PubSub and need to be synchronized before assertions are made.

Quick Start

Use the effect-concurrency-testing skill to test fiber coordination with Effect.yieldNow.

Frequently Asked Questions about effect-concurrency-testing

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

FAQPage Schema
How do I test Effect's concurrency primitives without race conditions?

Testing Effect's concurrency primitives without race conditions requires deterministic synchronization using explicit yield points like Effect.yieldNow and coordination tools such as Latch and Deferred.

How do I synchronize multiple fibers publishing events to a PubSub for assertions?

To synchronize multiple fibers publishing events to a PubSub, use fiber coordination primitives and explicit yield points to ensure all events are published before test assertions are made.

What is the best way to write deterministic tests for Effect-TS streams?

Writing deterministic tests for Effect-TS streams involves coordinating subscriptions using Deferred and SubscriptionRef to control data flow and prevent flaky concurrent behavior.

When do I need to use Latch and Deferred in Effect testing?

You need to use Latch and Deferred in Effect testing when coordinating concurrent fibers, ensuring specific effects complete or block before proceeding to validate event-driven system behavior.

How does Effect.yieldNow help with testing concurrent effects?

Effect.yieldNow helps with testing concurrent effects by providing explicit yield points that force fiber scheduling boundaries, ensuring deterministic execution and preventing race conditions.