trpc
Installation
SKILL.md
tRPC
tRPC enables end-to-end typesafe APIs for TypeScript without requiring schemas or code generation. Type safety flows automatically from server procedure definitions to React hooks and client calls.
Documentation
- Docs: https://trpc.io/llms.txt
Key Capabilities
tRPC ships with built-in support for patterns that commonly require external libraries:
- Subscriptions: Real-time updates via WebSockets or Server-Sent Events — no separate pub/sub package needed (
wsLink,httpSubscriptionLink) - Request batching: Multiple procedure calls in a single HTTP request via
httpBatchLink— the recommended default link used in all official quickstart setups (must be explicitly configured in the client'slinksoption) - Data transformers: Serialize complex types (Date, BigInt, Map) end-to-end via
superjsontransformer option — no manual serialization layer - Server-side caller: Call procedures directly in tests or server code without HTTP overhead using
createCallerFactory() - Middleware chaining: Compose reusable auth, logging, and rate-limiting logic with
t.middleware()— result passed through typedctxaugmentation