
Orpc Contract First
This is a focused approach to API development for the Dify frontend stack. You define contracts once in web/contract as your source of truth, then consume them directly at call sites with useQuery(consoleQuery.xxx.queryOptions(...)). The skill pushes back against over-abstraction: extract helpers only when three or more call sites share identical options, create custom hooks only for multi-query orchestration. It's opinionated about structure (params, query, body inputs; router nesting by API prefix) and gives you clear guidance on when to use .key() for invalidation versus .queryKey() for specific identity. If you're wiring up oRPC with TanStack Query and want to avoid the usual helper bloat, this keeps things lean and type-safe.
- skills.sh installs
- 713
- GitHub stars
- 160.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add langgenius/dify --skill orpc-contract-first --agent claude-codeInstalls into .claude/skills of the current project.
Files
This is a focused approach to API development for the Dify frontend stack. You define contracts once in web/contract as your source of truth, then consume them directly at call sites with useQuery(consoleQuery.xxx.queryOptions(...)). The skill pushes back against over-abstraction: extract helpers only when three or more call sites share identical options, create custom hooks only for multi-query orchestration. It's opinionated about structure (params, query, body inputs; router nesting by API prefix) and gives you clear guidance on when to use .key() for invalidation versus .queryKey() for specific identity. If you're wiring up oRPC with TanStack Query and want to avoid the usual helper bloat, this keeps things lean and type-safe.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/langgenius/dify
- Categories
- Frontend Development, Backend & APIs, Documentation