ワンクリックで
react-query-best-practices
Audit React Query usage for best practices — key factories, staleTime, mutations, and server state ownership
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Audit React Query usage for best practices — key factories, staleTime, mutations, and server state ownership
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Add a new Sim settings page, or audit existing settings pages for design-system compliance with the shared SettingsPanel layout. Use when creating a settings tab, or when asked to check/clean up settings pages so they match the design system (consistent title, header, search, spacing).
Review PRs and diffs for unbounded memory loading, concurrency explosions, oversized payload materialization, and missing pagination or byte caps. Use when reviewing cleanup jobs, background jobs, data imports/exports, file parsing, API fan-out, workflow execution payloads, large arrays/files, or any change that reads many rows, files, responses, logs, or external API pages into process memory.
Add or update a Sim knowledge base connector for syncing documents from an external source, including auth mode, config fields, pagination, document mapping, tags, and registry wiring. Use when working in `apps/sim/connectors/{service}/` or adding a new external document source.
Audit an existing Sim knowledge base connector against the service API docs and repository conventions, then report and fix issues in auth, config fields, pagination, document mapping, tags, and registry entries. Use when validating or repairing code in `apps/sim/connectors/{service}/`.
Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the `-- migration-safe` acknowledgment the check:migrations lint requires. Use when adding/editing files under `packages/db/migrations/` or changing `packages/db/schema.ts`.
Commit, push, and open a PR to staging in one shot — runs the cleanup pass and, when migrations changed, the db-migrate safety review first
| name | react-query-best-practices |
| description | Audit React Query usage for best practices — key factories, staleTime, mutations, and server state ownership |
Arguments:
User arguments: $ARGUMENTS
This codebase uses React Query (TanStack Query) as the single source of truth for all server state. All query hooks live in hooks/queries/. Zustand is used only for client-only UI state. Server data must never be duplicated into useState or Zustand outside of mutation callbacks that coordinate cross-store state.
Read these before analyzing:
hooks/queries/ must have a hierarchical key factory with an all root keylists, details) for prefix invalidationqueryFn must forward signal for request cancellationstaleTime (default 0 is almost never correct)keepPreviousData / placeholderData only on variable-key queries (where params change), never on static keysenabled to prevent queries from running without required paramsonSettled (not onSuccess) for cache reconciliation — it fires on both success and erroronMutate, roll back in onErrorentityKeys.lists()) not broad (entityKeys.all) when possibleuseCallback deps — .mutate() is stablesetQueryData is for optimistic updates onlystaleTime: Infinity