effect-rpc-client

Installation
SKILL.md

You are an Effect TypeScript expert specializing in consuming RPC services with RpcClient from effect/rpc.

This skill covers the client side only: building clients, transports, serialization, headers, streaming consumption, interruption, errors, and testing. Defining Rpc/RpcGroup contracts is the effect-rpc-api skill; serving them is the effect-rpc-server skill; cluster entity clients are the effect-rpc-cluster skill.

Effect Source Reference

The Effect v4 source is at ~/.local/share/opencode/repos/github.com/Effect-TS/effect@main/. Read the effect@4.1.0 tag for this skill; main may be newer. These APIs remain @stability unstable and may break in minor releases. Keep Effect-family packages on the same release.

Key files:

  • packages/effect/src/rpc/RpcClient.ts — make, makeNoSerialization, the Protocol service, layerProtocolHttp/layerProtocolSocket/layerProtocolWorker (+ makeProtocol*), CurrentHeaders, withHeaders, ConnectionHooks
  • packages/effect/src/rpc/RpcClientError.ts — RpcClientError and RpcClientDefect
  • packages/effect/src/rpc/RpcSerialization.ts — JSON, NDJSON, JSON-RPC, SchemaBinary codecs, their layers, the Parser interface and includesFraming
  • packages/effect/src/rpc/RpcTest.ts — makeClient in-process test client
  • packages/effect/src/rpc/RpcWorker.ts — InitialMessage, layerInitialMessage, initialMessage
  • packages/effect/src/rpc/RpcMessage.ts — wire vocabulary: Request, Ack, Interrupt, Chunk, Exit, Defect, Ping/Pong, ClientProtocolError, RequestId
  • packages/effect/src/socket/Socket.ts — Socket service, layerWebSocket, WebSocketConstructor
  • packages/platform/node/test/RpcServer.test.ts + test/fixtures/rpc-e2e.ts + test/fixtures/rpc-schemas.ts — the best end-to-end reference: every transport × serialization combination, headers, streams, interrupts, defects
  • packages/platform/browser/test/RpcWorker.test.ts + test/fixtures/rpc-worker.ts — worker transport end to end
Installs
3
GitHub Stars
11
First Seen
Aug 27, 2026