oRPC Router to Contract

Convert a router into a minified JSON contract without exposing internal logic.

8|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ali-master/skills --skill orpc-router-to-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oRPC Router to Contract
Source: https://github.com/ali-master/skills/tree/main/skills/orpc-router-to-contract
Command: npx skills add https://github.com/ali-master/skills --skill orpc-router-to-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill converts a router into a contract, ensuring safe export and preventing internal exposure.

Core Features & Use Cases

  • Router Conversion: Transform a router into a contract, preserving only metadata and routing info.
  • Minification & Export: Minify the contract router and export it as JSON for client-side use.
  • Use Case: Ideal for APIs where you want to expose a router as a contract without exposing internal logic.

Quick Start

Convert your router to a contract and export it using the oRPC Router to Contract skill.

Frequently Asked Questions about oRPC Router to Contract

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

FAQPage Schema
How do I convert an API router to a contract for safe client-side export?

To convert an API router to a contract, you pass the router object to the transformation process which preserves only metadata and routing info. This produces a safe JSON contract that prevents internal logic exposure.

What is router-to-contract transformation used for in API development?

Router-to-contract transformation is used to expose API routing information and metadata as a standalone contract. It prevents internal logic exposure while allowing the resulting contract to be safely exported for client-side use.

Can I minify the exported API contract router JSON?

Yes, you can minify the exported API contract router JSON. The conversion process supports minification functionality to reduce the size of the exported contract before saving it for client-side use.

Does the router conversion process require external dependencies to export JSON?

No external dependencies are required to convert the router and export the JSON contract. You only need to provide the existing router object to generate the minified contract output.

What is the best way to prevent internal API logic exposure when sharing routers?

The best way to prevent internal API logic exposure is converting the router into a contract. This strips internal logic and preserves only metadata and routing info before exporting it as JSON.