What problem does it solve?
Building distributed RPC endpoints and actor-like stateful entities is error-prone when you must keep schemas, transport wiring, and concurrency/persistence guarantees consistent across client and server.
Core Features & Use Cases
- Type-safe RPC definitions: define
Rpc values with payload/success/error schemas and optional stream support, then reuse the exact same definitions everywhere.
- Cluster-ready actor state: create
Entity, sharded routing, Singleton, and cron-driven singletons with durable/dedup-friendly request identity via primaryKey.
- Transport + middleware correctness: mount RPC servers across HTTP/WebSocket/Socket/Stdio transports and enforce cross-cutting concerns using
RpcMiddleware (including client-side enforcement with layerClient).
Quick Start
Load this skill and ask your AI to design a sharded cluster Entity backed by durable message storage and expose it through typed Effect RPC over WebSocket, including middleware that validates a token from request headers and returns a wire-safe error schema.