effect-batching

Installation
SKILL.md

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 ~/.local/share/opencode/repos/github.com/Effect-TS/effect@main/. Baseline: effect@4.1.0 stable. Read source with git show effect@4.1.0:<path>; the exact tag, not a newer main checkout, defines these contracts.

Reference this for:

  • Request and Request.Class definitions (packages/effect/src/Request.ts)
  • RequestResolver constructors and combinators (packages/effect/src/RequestResolver.ts)
  • SqlResolver for SQL-specific batching (packages/effect/src/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.

Installs
3
GitHub Stars
11
First Seen
Aug 27, 2026