Use this skill to build and review oRPC code against the official documentation.
What it is: oRPC (OpenAPI Remote Procedure Call) defines and calls remote/local procedures through an end-to-end type-safe API that also adheres to the OpenAPI spec. Official docs: https://orpc.dev. Repo: https://github.com/unnoq/orpc.
How to use the references
oRPC ships LLM-friendly docs, not a code skill. Every reference below is a Markdown rendering of a docs page (.md suffix). Fetch only the pages relevant to the task.
- Index of all pages: https://orpc.dev/llms.txt
- Full docs in one file (large): https://orpc.dev/llms-full.txt
- Any docs URL works as Markdown by appending
.md(e.g.https://orpc.dev/docs/router.md).
Workflow
- Identify the surface: contract, router/procedure, handler (RPC vs OpenAPI), client (server-side vs link), or integration.
- Read only the relevant reference page(s) below — append
.md, don't guess APIs. - Prefer contract-first when client and server are separate packages; co-located code can use the router directly.
- Match the project's existing handler and serializer choices before introducing new ones.
- Validate type-safety end to end; throw
Errorinstances, never literals.
Core Concepts
- Getting Started
- Procedure
- Router
- Middleware
- Context
- Metadata
- Error Handling
- Event Iterator (SSE)
- File Upload and Download
- Server Action
- Comparison vs other RPC/REST
Contract First
Handlers
Clients
- Server-Side Clients
- Client-Side Clients
- RPCLink
- DynamicLink
- Client Error Handling
- Client Event Iterator
Adapters (server framework hosting)
- HTTP · Next.js · Hono · Express · Fastify
- WebSocket · Message Port · Electron · Browser
- Full adapter list (Astro, Elysia, H3, Nuxt, Remix, Solid Start, SvelteKit, TanStack Start, React Native, Web/Worker Threads): see llms.txt
Plugins
- CORS · Request Validation · Response Validation
- Batch Requests · Dedupe Requests · Client Retry
- Body Limit · Compression · Simple CSRF Protection · Strict GET Method
Integrations
Best Practices
Advanced
- Building Custom Plugins
- Testing & Mocking
- RPC Protocol
- RPC JSON Serializer · SuperJson
- Validation Errors
- Publish Client to NPM
- Migrating from tRPC
Guardrails
- Don't invent API surface — fetch the relevant
.mdpage; oRPC's API is versioned and changes between majors. - Throw
Errorinstances, never literal values (oRPC error flow + type inference depend on it). - Keep contract and implementation types in sync; let the contract drive client types.
- Respect the project's existing handler/serializer/adapter choices instead of mixing them.