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.
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-batchingnpx skills add mpsuesser/pi-effect-harness --skill effect-batchinggit clone --depth 1 https://github.com/mpsuesser/pi-effect-harnessWrote 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.
[](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-batching)<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-batching"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-batching.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00052 | $0.03841 |
| Opus 5 | $0.00026 | $0.01920 |
| Sonnet 5 | $0.00010 | $0.00768 |
| Haiku 4.5 | $0.00005 | $0.00384 |
Grade A, and why
effect-batching 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 597 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an Effect TypeScript expert specializing in request batching, deduplication, and efficient data-fetching patterns.
Effect Source Reference
The Effect v4 source is available at ~/.cache/effect-v4/.
Browse and read files there directly to look up APIs, types, and implementations.
Reference this for:
RequestandRequest.Classdefinitions (packages/effect/src/Request.ts)RequestResolverconstructors and combinators (packages/effect/src/RequestResolver.ts)SqlResolverfor SQL-specific batching (packages/effect/src/unstable/sql/SqlResolver.ts)- Batching tutorial (
ai-docs/src/05_batching/10_request-resolver.ts)
The N+1 Problem
Naive data fetching executes one query per item. Fetching 100 users by ID produces 100 separate queries. Effect's batching system solves this automatically: individual Effect.request calls made concurrently within a batch window are collected and resolved together in a single batch.
The key insight: calling code writes single-item lookups, but the runtime collects them and hands the resolver an array. No manual batching logic leaks into business code.
Request Definition
A Request<Success, Error, Services> describes a single lookup. Define requests using Request.Class:
import { Effect, Exit, Request, RequestResolver, Schema } from 'effect';
// Domain types
class User extends Schema.Class<User>('User')({
id: Schema.Number,
name: Schema.String,
email: Schema.String
}) {}
class UserNotFound extends Schema.TaggedErrorClass<UserNotFound>()(
'UserNotFound',
{
id: Schema.Number
}
) {}
// Request definition using Request.Class
// Type params: { payload fields }, Success, Error, Services
class GetUserById extends Request.Class<
{ readonly id: number },
User,
UserNotFound,
never
> {}
Alternative: Interface + tagged constructor
For simpler cases or when you don't need a class:
interface GetUserById extends Request.Request<User, UserNotFound> {
readonly _tag: 'GetUserById';
readonly id: number;
}
const GetUserById = Request.tagged<GetUserById>('GetUserById');
// Usage:
const req = GetUserById({ id: 42 });
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.
- 5d ago First seen · 597 lines · 52 tokens per session scan A 825a4b9f23dc
effect-batching is a skill published in the GitHub repository mpsuesser/pi-effect-harness (23 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 3,841 once invoked, about $0.0003 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.
Other skills, from other repositories
event-driven
Event-driven architecture authority — Redis pub/sub, event bus patterns, async event pipelines, channel management, startup recovery, dead-letter handling, and reactive system design.
render-keyvalue
Provisions and configures Render Key Value (Redis-compatible Valkey 8) instances for caching, session storage, and job queues. Use when the user needs Redis, Key Value, Valkey, a cache, session store, job queue backend, or needs to configure maxmemory policy, ipAllowList, connection strings, or internal vs external…
redis-inspect
Inspect Redis cache keys, values, and TTLs for debugging. Supports both main cache and system cache. Use for debugging cache issues, checking cached values, and monitoring cache state. Read-only by default.
redis-js
Work with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating with @upstash/redis search extension), and all Redis data structures. Supports automatic serialization/deserialization…
bun-redis
Use when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.
nw-database-technology-selection
Database comparison catalogs, RDBMS vs NoSQL selection criteria, CAP/ACID/BASE theory, OLTP vs OLAP, and technology-specific characteristics.