orpc-migrate

Migrate codebases from tRPC to oRPC or upgrade oRPC v1 to v2.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill orpc-migrate-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: orpc-migrate
Source: https://github.com/Chia1104/agent-air/tree/main/skills/shared/orpc-migrate
Command: npx skills add https://github.com/Chia1104/agent-air --skill orpc-migrate-chia1104

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating an existing codebase to oRPC is error-prone because pretrained knowledge of oRPC describes v1 and is often wrong for v2, and the v1-to-v2 upgrade hides silent behavior changes that never surface at compile time. This Skill provides a verified, step-by-step playbook for both migrations so each change can be typechecked and tested incrementally. ## Core Features & Use Cases - tRPC to oRPC migration: Choose between incremental wrapping of an existing tRPC router via @orpc/trpc (toORPCRouter, toTRPCMeta) or a full rewrite using a complete tRPC-to-oRPC concept mapping table. - oRPC v1 to v2 upgrade: Ordered steps covering package renames (e.g., @orpc/react-query to @orpc/tanstack-query), hard breaking changes with no aliases, silent behavior changes (wire format, middleware deduplication, batch plugin filter), and deprecated alias sweeps. - Docs-first retrieval: Directs every import path, builder method, and option name to authoritative pages at orpc.dev and v1.orpc.dev instead of relying on memory. - Use Case: You inherit an Express app with a large tRPC router that must keep shipping. Use this Skill to wrap the router with toORPCRouter, then rewrite leaf routers to native oRPC one at a time while typechecking after each step. ## Quick Start Migrate my tRPC router in src/server to oRPC v2 using the incremental wrapping approach and verify each step with typecheck.

Frequently Asked Questions about orpc-migrate

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

FAQPage Schema
How do I migrate from tRPC to oRPC?▼

Migrate tRPC to oRPC either incrementally by wrapping the existing router with toORPCRouter from @orpc/trpc, or via a full rewrite using the concept map: t.procedure becomes os, .query/.mutation become .handler, and routers become plain objects. Verify with typecheck after each step.

How to upgrade oRPC v1 to v2?▼

Upgrade oRPC v1 to v2 by installing all @orpc/* packages from the beta dist-tag, applying package renames like @orpc/react-query to @orpc/tanstack-query, fixing hard breaks such as removed .route and RPCLink url splitting, then auditing silent behavior changes and sweeping deprecated aliases.

Does oRPC v2 work with a v1 client or server?▼

No, the oRPC v2 wire format changed, so a v1 link cannot talk to a v2 server in either direction. Deploy the upgraded server and clients together to avoid communication failures.

Why does my oRPC middleware run twice after upgrading to v2?▼

oRPC v2 removed automatic middleware deduplication, so middleware applied at both router and procedure level now runs twice with no warning. Guard shared middleware with the context-flag pattern from the dedupe-middleware recipe.

When should I not use the tRPC to oRPC migration approach?▼

Do not use this migration playbook for greenfield oRPC projects or new features in an already-migrated codebase; use the general orpc skill instead. It is scoped to converting existing tRPC routers and upgrading v1 code.