AI AGENT ADDONS

Orpc Contract First

langgenius/dify
Backend & APIs
721installs

Developers building Dify frontend can use a contract-first approach to keep APIs consistent. The contract acts as a single source of truth in the web/contract folder. This method preserves TypeScript type inference and reduces errors.

The core workflow starts with defining a contract in the right domain file. You then register it in the router. Finally you consume the contract from UI call sites using TanStack Query. This keeps everything aligned.

There are clear rules for when to use queryOptions directly and when to extract helpers. Avoid creating thin use-* hooks for a single endpoint. This skill helps you decide the best pattern.

Add Orpc Contract First skill to your workflow

Global

mkdir -p ~/.claude/skills/orpc-contract-first

Project

mkdir -p .claude/skills/orpc-contract-first

Source Repository

Stars
146,852
Forks
23,135
Watchers
146,852
License
NOASSERTION
Last Push
1 month ago
Created
3 years ago