orpc-api

Implement type-safe oRPC API endpoints with shared Zod schemas.

Updated Sep 21, 2025
One-click install
npx skills add https://github.com/hmjn023/solid-imager --skill orpc-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc-api
Source: https://github.com/hmjn023/solid-imager/tree/main/.opencode/skills/orpc-api
Command: npx skills add https://github.com/hmjn023/solid-imager --skill orpc-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables building type-safe API endpoints using the oRPC framework, ensuring client-server schema sharing and automatic validation, which reduces API drift and speeds development.

Core Features & Use Cases

  • Type-safe RPC endpoints with shared Zod schemas between client and server.
  • Automatic OpenAPI generation and synchronized router wiring for frontend calls.
  • Clear separation of routing, service logic, and validation to support scalable API development.

Quick Start

Define a Zod schema, implement a router that uses it, register the router in the shared API contract, and call it from the frontend client.

Frequently Asked Questions about orpc-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share Zod schemas between frontend and server for type-safe API calls?

You share Zod schemas between frontend and server by defining input validation in oRPC router definitions, which automatically enforces domain schemas and generates matching TypeScript types for client calls.

How does oRPC generate OpenAPI documentation from TypeScript routers?

oRPC generates OpenAPI documentation by reading your router definitions and Zod schemas, supporting automated OpenAPI updates to keep API documentation synchronized with your actual endpoint implementations.

How do I structure an oRPC project to separate routing, validation, and service logic?

You structure an oRPC project by defining Zod schemas for validation, implementing routers that delegate to service layers, and registering them in a shared API contract for frontend consumption.

Can I use oRPC to call internal routers directly from my frontend client?

Yes, you can use oRPC to call internal routers directly from your frontend client by registering routers in the shared API contract and using the generated type-safe client to execute server calls.

Does oRPC support automated unit testing patterns for API endpoints?

oRPC supports automated unit testing patterns by enforcing input validation against domain schemas and delegating to service layers, allowing you to test routing and service logic independently.

What is the best way to prevent API drift when building type-safe endpoints?

The best way to prevent API drift is using oRPC to share Zod schemas between client and server, ensuring automatic validation and synchronized router wiring across your entire application.