orpc-contract-first

Define API contracts as the single source of truth for oRPC layers.

239|19|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/taichuy/7flows --skill orpc-contract-first-taichuy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc-contract-first
Source: https://github.com/taichuy/7flows/tree/main/.agents/skills/orpc-contract-first
Command: npx skills add https://github.com/taichuy/7flows --skill orpc-contract-first-taichuy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the need for a structured, contract-first approach to API development within the 7Flows project, ensuring API stability and maintainability.

Core Features & Use Cases

  • Contract Definition: Establishes a single source of truth for API contracts.
  • Type Safety: Maintains stable input and output types for API interactions.
  • Reduced Boilerplate: Minimizes scattered request details in client code.
  • Use Case: Implementing a new oRPC API layer for the 7Flows frontend, ensuring all client-server communication adheres to a predefined contract.

Quick Start

Use the orpc-contract-first skill to define a new API contract in the web/contract directory.

Frequently Asked Questions about orpc-contract-first

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

FAQPage Schema
How do I enforce contract-first API development in TypeScript?

Contract-first API development is enforced by defining API contracts as a single source of truth, scoping new oRPC contract layers, and migrating existing calls to contract-driven patterns for stable input/output types.

What is a single source of truth for API contracts in oRPC?

A single source of truth for API contracts is a centralized definition in the web/contract directory that maintains type safety and reduces boilerplate by preventing scattered request details across client code.

How do I migrate existing API calls to contract-driven patterns?

Migrating existing API calls to contract-driven patterns involves scoping new oRPC contract layers to replace scattered request details, ensuring all client-server communication adheres to predefined stable input and output types.

Does contract-first API development reduce boilerplate in frontend code?

Contract-first API development reduces boilerplate by centralizing API definitions, which minimizes scattered request details in frontend client code and ensures interactions maintain stable input and output types.

Can I use oRPC contracts for backend and frontend development?

oRPC contracts support both backend and frontend development by establishing a single source of truth for API interactions, ensuring stable types and structured client-server communication across the TypeScript stack.

When do I need contract-first API development for my project?

Contract-first API development is needed when your project requires structured API stability and maintainability, specifically addressing the need to enforce a single source of truth for stable input/output types.