effect-concurrency-testing

effect-concurrency-testing is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 43 tokens per session (3,963 once invoked), scanned A, original, MIT.

A set of testing patterns for Effect's tools for running concurrent work, such as fibers, event channels, waiting signals, and streams. It helps tests coordinate exactly when asynchronous work is ready or complete.

In plain words
What is it for?
Use it to test event-driven systems, asynchronous streams, PubSub messages, subscriptions, and coordination between concurrent Effect tasks.
Why use it?
Concurrent code can produce flaky tests when they rely on arbitrary delays or start tasks in the wrong order. These patterns provide clearer ways to wait for events, control test time, and check task status.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test event-driven systems, asynchronous streams, PubSub messages, subscriptions, and coordination between concurrent Effect tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-concurrency-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mpsuesser/pi-effect-harness --skill effect-concurrency-testing
Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for effect-concurrency-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-concurrency-testing.svg)](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-concurrency-testing)
Your own site
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-concurrency-testing"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-concurrency-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.03963
Opus 5 $0.00022 $0.01982
Sonnet 5 $0.00009 $0.00793
Haiku 4.5 $0.00004 $0.00396

Measured 8d ago against content hash 5d2d5ea65913, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

effect-concurrency-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

harnesses/effect/skills/effect-concurrency-testing/SKILL.md · 613 lines

How it starts

The opening of the file, as written. The whole thing — 613 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Effect Concurrency Testing Skill

This skill provides patterns for testing Effect's concurrency primitives: fibers, latches, deferreds, PubSub, SubscriptionRef, and streams.

Core Principles

CRITICAL: Choose the correct coordination primitive based on what you need to synchronize.

Need Use
Simple fiber yield Effect.yieldNow
Wait for subscriber ready Deferred.make() + Deferred.await
Wait for stream element Latch.make() + Stream.tap(() => latch.open)
Passive subscription registration explicit readiness signal if possible; otherwise a tiny one-tick yield/sleep fallback
Time-dependent behavior TestClock.adjust
Verify events published PubSub.subscribe + PubSub.takeUpTo
Check fiber status fiber.pollUnsafe()

For Stream.fromPubSub subscription registration, prefer an explicit readiness signal when you control the stream. If the API offers no readiness hook and you only need registration to settle before publishing, a tiny Effect.yieldNow() or very short sleep is an acceptable last resort. Avoid broad polling or arbitrary delays.

Fiber Coordination Patterns

Effect.yieldNow - Simple Fiber Scheduling

Use Effect.yieldNow when you need to allow other fibers to execute. This is preferred over TestClock.adjust for non-time-dependent code.

import { it } from '@effect/vitest';
import { Effect, Exit, Fiber, Latch } from 'effect';

it.effect('fiber polling with yieldNow', () =>
	Effect.gen(function* () {
		const latch = yield* Latch.make();

		const fiber = yield* latch.await.pipe(Effect.forkChild);

		yield* Effect.yieldNow();

		expect(fiber.pollUnsafe()).toBeUndefined();

		yield* latch.open;

		expect(yield* fiber.await).toEqual(Exit.void);
	})
);

Read the full file on GitHub · 613 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 613 lines · 43 tokens per session scan A 5d2d5ea65913

Subscribe to this mod's changes

effect-concurrency-testing is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 3,963 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

effect-patterns-testing

Effect-TS patterns for Testing. Use when working with testing in Effect-TS applications.

PaulJPhilp/EffectPatterns · 23 tokens

test-patterns

Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable, reliable, and readable test suites. Use when the user asks about writing unit tests, integration tests, or end-to-end…

rohitg00/skillkit · 138 tokens

dhpk-tdd-workflow

Framework-agnostic test-driven development guidance for behavior-first unit and integration tests, test scaffolds, and minimal RED-GREEN-REFACTOR changes. Use when building a feature or fixing a bug test-first, writing a test scaffold, or reviewing test seams and mocks. Not for: Playwright journey authoring, pure…

hmj1026/dhpk · 109 tokens

dhpk-library-dual-testsuite-map

Map edited file paths to the correct testsuite(s) for libraries with a framework-agnostic Core layer and a framework-specific glue layer. Use when editing any src/ file in a library whose phpunit.xml declares multiple testsuites (commonly core + laravel, or core + symfony, etc.) and you need to know which composer…

hmj1026/dhpk · 181 tokens

rust-bevy-test-conventions

Conventions and best practice for writing tests in Rust applications using Bevy ECS. Use when writing or creating tests for Bevy systems, components, resources, or game logic in Rust.

kimgoetzke/coding-agent-configs · 44 tokens

dhpk-pytest-async

Async pytest + pytest-asyncio testing: asynciomode=auto, SQLite fixtures, httpx.AsyncClient + ASGITransport, unit/integration split, coverage floor, live markers. Use when writing or reviewing async FastAPI/SQLAlchemy tests, or enforcing dhpk-tdd-workflow. Not for production code. Output: offline-green async tests.

hmj1026/dhpk · 79 tokens