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, theProtocolservice,layerProtocolHttp/layerProtocolSocket/layerProtocolWorker(+makeProtocol*),CurrentHeaders,withHeaders,ConnectionHookspackages/effect/src/rpc/RpcClientError.ts—RpcClientErrorandRpcClientDefectpackages/effect/src/rpc/RpcSerialization.ts— JSON, NDJSON, JSON-RPC, SchemaBinary codecs, their layers, theParserinterface andincludesFramingpackages/effect/src/rpc/RpcTest.ts—makeClientin-process test clientpackages/effect/src/rpc/RpcWorker.ts—InitialMessage,layerInitialMessage,initialMessagepackages/effect/src/rpc/RpcMessage.ts— wire vocabulary:Request,Ack,Interrupt,Chunk,Exit,Defect,Ping/Pong,ClientProtocolError,RequestIdpackages/effect/src/socket/Socket.ts—Socketservice,layerWebSocket,WebSocketConstructorpackages/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, defectspackages/platform/browser/test/RpcWorker.test.ts+test/fixtures/rpc-worker.ts— worker transport end to end