effect-rpc-server

effect-rpc-server is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 100 tokens per session (9,354 once invoked), scanned A, original, MIT.

Guidance for serving Effect RPC contracts from a server. It covers implementing request handlers, choosing transports such as HTTP or WebSocket, serializing data, adding middleware, and managing streaming and shutdown behavior.

In plain words
What is it for?
Use it when implementing the server side of an Effect RPC API, including handler layers, HTTP, WebSocket, TCP, standard-input/output, worker transports, middleware, streaming responses, and RPC tests.
Why use it?
It provides a structured way to turn defined RPC operations into a working server while handling communication and server lifecycle details.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { SecureRpcs } from '../domain/rpc.ts';.

Good fit Use it when implementing the server side of an Effect RPC API, including handler layers, HTTP, WebSocket, TCP, standard-input/output, worker transports, middleware, streaming responses, and RPC tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness
agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-rpc-server

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-rpc-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-rpc-server.svg)](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-rpc-server)
Your own site
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-rpc-server"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-rpc-server.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,354 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00100 $0.09354
Opus 5 $0.00050 $0.04677
Sonnet 5 $0.00020 $0.01871
Haiku 4.5 $0.00010 $0.00935

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

Security

Grade A, and why

effect-rpc-server scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. **Forgetting `protocol: 'http'` on `layerHttp`.** The default is `'websocket'` — your `POST /rpc` curl returns 404 and only a `GET` upgrade route exists. Also note `layerHttp` takes `{ group, path, ... }` as one optio
harnesses/effect/skills/effect-rpc-server/SKILL.md · 752 lines

How it starts

The opening of the file, as written. The whole thing — 752 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 serving RPC groups with RpcServer from effect/unstable/rpc.

Everything ships from the effect package under effect/unstable/rpc — there is no @effect/rpc package in v4. This skill covers the server side: implementing handlers, transports, serialization, middleware, and lifecycle. For defining Rpc/RpcGroup contracts see the effect-rpc-api skill; for building clients see the effect-rpc-client skill; for cluster entities see the effect-rpc-cluster skill; for HttpRouter/HttpServer fundamentals see the effect-http-server skill.

Effect Source Reference

The Effect v4 source is at ~/.cache/effect-v4/. Read it directly when in doubt — these modules change between betas.

Key files:

  • packages/effect/src/unstable/rpc/RpcServer.tsmake, makeNoSerialization, layer, layerHttp, every layerProtocol* / makeProtocol*, toHttpEffect*, the Protocol service
  • packages/effect/src/unstable/rpc/RpcGroup.tstoLayer, toLayerHandler, toHandlers, accessHandler, of, handler type derivation
  • packages/effect/src/unstable/rpc/Rpc.tsServerClient, Handler, ToHandlerFn, ResultFrom, fork, uninterruptible, ServicesServer
  • packages/effect/src/unstable/rpc/RpcMiddleware.tsService constructor, server middleware function shape, layerClient
  • packages/effect/src/unstable/rpc/RpcSerialization.tsjson, ndjson, jsonRpc, ndJsonRpc, msgPack parsers and their layers
  • packages/effect/src/unstable/rpc/RpcMessage.ts — the wire vocabulary (Request, Ack, Interrupt, Eof, Chunk, Exit, Defect, ClientEnd)
  • packages/effect/src/unstable/rpc/RpcWorker.tsInitialMessage for worker transports
  • packages/effect/src/unstable/rpc/RpcTest.ts — in-process test client
  • packages/effect/src/unstable/rpc/RpcSchema.tsClientAbort cause annotation, stream schema markers
  • packages/platform-node/test/RpcServer.test.ts + test/fixtures/rpc-{schemas,e2e}.ts — the best end-to-end reference for real wiring across http/ws/tcp transports and every serialization
  • packages/platform-browser/test/fixtures/rpc-worker.ts — minimal worker-side server entrypoint

Read the full file on GitHub · 752 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. 7d ago First seen · 752 lines · 100 tokens per session scan A a9ababd9f999

Subscribe to this mod's changes

effect-rpc-server is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 100 tokens to every session and 9,354 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.