orpc-contract-first

Implement oRPC contract-first API patterns in Dify frontend projects.

1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/sangrokjung/claude-code-config-public --skill orpc-contract-first-sangrokjung
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc-contract-first
Source: https://github.com/sangrokjung/claude-code-config-public/tree/main/skills/orpc-contract-first
Command: npx skills add https://github.com/sangrokjung/claude-code-config-public --skill orpc-contract-first-sangrokjung

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies and standardizes the implementation of oRPC contract-first API patterns, ensuring consistency and type safety across frontend development.

Core Features & Use Cases

  • Contract Definition: Define API contracts with clear input and output structures.
  • Router Registration: Organize API endpoints logically within a router.
  • Hook Generation: Create type-safe hooks for seamless API integration using TanStack Query.
  • Use Case: When developing new API endpoints for the billing domain, use this skill to define the contract, register it in the router, and generate the necessary hooks for the frontend to consume.

Quick Start

Create a new oRPC contract for the billing domain in web/contract/console/billing.ts.

Frequently Asked Questions about orpc-contract-first

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

FAQPage Schema
How do I create a contract-first API endpoint with oRPC in a TypeScript frontend?

Create a contract-first API endpoint with oRPC by defining input and output structures in a TypeScript contract file, then registering the service endpoint in an organized router.

How does TanStack Query integrate with oRPC contract definitions?

TanStack Query integrates with oRPC contract definitions by generating type-safe hooks that allow your frontend to consume the API contracts seamlessly, ensuring end-to-end type safety across your service layer.

What is the standard directory structure for oRPC contract-first API development?

The standard directory structure for oRPC contract-first API development enforces separating API layer development across the web/contract directory for definitions and the web/service directory for endpoint registration.

Can I use oRPC contract-first patterns for a specific domain like billing?

Yes, you can use oRPC contract-first patterns for a specific domain like billing by creating a dedicated contract file such as web/contract/console/billing.ts to define domain-specific API structures.

Why use a contract-first approach for oRPC API development?

Use a contract-first approach for oRPC API development to simplify and standardize API implementation, ensuring consistency and type safety across frontend development by defining clear input and output structures upfront.