langgenius avatar

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-code

Installs 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 GitHub

Sponsors

Details

Repository
github.com/langgenius/dify
Categories
Frontend Development, Backend & APIs, Documentation

More from langgenius/dify

All 8
1patternsdev avatarjs-performance-patternspatternsdev/skillsProvides framework-agnostic JavaScript runtime performance patterns. Use when optimizing hot paths, loops, DOM operations, caching, or data structure choices in706skills.sh installs
2mindrally avatarturbopack-bundlermindrally/skillsBest practices and guidelines for Turbopack, the Rust-powered incremental bundler for Next.js and modern web development702skills.sh installs
3mindrally avatarapollo-graphqlmindrally/skillsGuidelines for developing GraphQL APIs and React applications using Apollo Client for state management, data fetching, and caching701skills.sh installs
4mindrally avatarmonorepo-tamaguimindrally/skillsMonorepo development guidelines using Tamagui, Turbo, Next.js, Expo, Supabase, and cross-platform best practices.701skills.sh installs
5patternsdev avatarview-transitionspatternsdev/skillsTeaches the View Transitions API for animating DOM changes. Use when you want smooth animated transitions between pages or UI states without manual animation co699skills.sh installs
6uni-helper avatarpiniauni-helper/skillsPinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patte679skills.sh installs