frontend-query-mutation

Installation
SKILL.md

Frontend Query & Mutation

Intent

  • Keep contract as the single source of truth in web/contract/*.
  • Prefer contract-shaped queryOptions() and mutationOptions().
  • Keep default cache behavior with consoleQuery/marketplaceQuery setup, and keep business orchestration in feature vertical hooks when direct contract calls are not enough.
  • Treat web/service/use-* query or mutation wrappers as legacy migration targets, not the preferred destination.
  • Keep abstractions minimal to preserve TypeScript inference.

Workflow

  1. Identify the change surface.
    • Read references/contract-patterns.md for contract files, router composition, client helpers, and query or mutation call-site shape.
    • Read references/runtime-rules.md for conditional queries, default options, cache updates/invalidation, error handling, and legacy migrations.
    • Read both references when a task spans contract shape and runtime behavior.
  2. Implement the smallest abstraction that fits the task.
    • Default to direct useQuery(...) or useMutation(...) calls with oRPC helpers at the call site.
    • Extract a small shared query helper only when multiple call sites share the same extra options.
Related skills

More from langgenius/dify

Installs
94
Repository
langgenius/dify
GitHub Stars
141.3K
First Seen
Mar 16, 2026