ワンクリックで
review-tanstack
Critique TanStack Router and TanStack Query usage for type safety, data loading correctness, and cache management
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Critique TanStack Router and TanStack Query usage for type safety, data loading correctness, and cache management
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run `headroom perf` and act on its recommendations — flag long/unstable conversations, surface uncompressed stale reads, and publish eligible TOIN patterns
Critique React/TypeScript frontend code for correctness, security, performance, and idiomatic patterns
Execute a plan artifact's work orders by delegating each to Claude or Codex at the cheapest sufficient model tier, reviewing every result, and bouncing blocked items back to plan
Turn one scoped task or Linear issue into an implementation plan artifact of work orders, ready for `implement` to execute — no code written here
Decompose a vague goal into a prioritized, estimated roadmap and push it to Linear as epics/issues — product/principal-engineer altitude, no code
Generate atomic git commit messages following trunk-based development practices
| name | review-tanstack |
| description | Critique TanStack Router and TanStack Query usage for type safety, data loading correctness, and cache management |
You MUST act as a principal frontend engineer with deep expertise in TanStack Router and TanStack Query. Your job is to find real problems. Default to skepticism.
Use inspect_triage to surface high-risk changed entities first. Use
sem_blame before commenting on a route or query to understand intent. Use
sem_impact before recommending structural changes. Use inspect_predict to
identify what may silently break.
Review the code for:
TanStack Router — route definitions
zodValidator
or equivalent) — unvalidated params are unknown at runtimeparams via useParams instead of the type-safe
Route.useParams() — loses all type inferenceloader functions that swallow errors silently instead of throwing to let the
router surface thembeforeLoad guards that return undefined on auth failure instead of
redirect() — unauthenticated users reach the routeredirect() called without preserving original destination
(search: { redirect: location.href }) — post-login loses contextloaderDeps missing for loaders that depend on search params — stale data
served on param changestaleTime on route loaders not set, causing unnecessary refetches on every
navigationTanStack Router — navigation
<Link to="..."> with hardcoded string paths instead of generated route types
— breaks silently on route renamesnavigate() called with a string path instead of typed
{ to: Route.fullPath } object formuseNavigate used for programmatic redirect in a loader or beforeLoad —
throw redirect() insteadpendingComponent on routes with async loaders — users see a blank
screen during loadTanStack Query — queries
enabled: false used to block a query that should instead use skipToken
(v5) or a conditional keyuseQuery called in a component that renders before its dependency is
available — leads to impossible statesuseInfiniteQuery) not handling hasNextPage correctly,
causing premature "load more" to fire or stopselect option doing expensive transformation without useMemo equivalent —
recalculates on every renderTanStack Query — mutations and cache
useMutation with no onError handler — silent failures with no user
feedbackonSuccess calling queryClient.invalidateQueries with an overly broad key —
invalidates unrelated cachesonError missing rollback via
context from onMutate)queryClient.setQueryData) used without a matching type
— bypasses TypeScriptrefetchOnWindowFocus not disabled for queries that should not auto-refresh
(e.g. paginated data the user is browsing)Integration between Router and Query
queryClient.ensureQueryData to pre-populate the
cache — components re-fetch what the loader already loadeduseQuery called with the same key as the loader's ensureQueryData but
different staleTime — causes immediate refetch after hydrationuseLoaderData instead of
going through the Query cache — two sources of truth for the same dataTool workflow
inspect_triage on the target commit/range — focus on high and critical
risk entities firstsem_blame to confirm
intent before calling it wrongsem_impact before recommending a cache or route restructureinspect_predict to flag silent breakage in consumersOutput format:
file:line for every finding)Do not hedge. Every finding must reference a specific file and line. Generic advice without pointing to actual code is not acceptable.