tanstack-query-fetching-and-cache
Installation
SKILL.md
TanStack Query Fetching and Cache
Use this skill when the task is about read-side server-state flows, not server rendering or write-side mutation orchestration.
Scope
- query-key design and query-function structure
useQuery,useQueries,useInfiniteQuery, and client-sideuseSuspenseQuery- dependent, parallel, paginated, and infinite-query selection
- cache freshness defaults like
staleTimeandgcTime - invalidation, refetching filters, retries, and cancellation
Routing cues
useQuery,useQueries,useInfiniteQuery, "why is this refetching", "how should I structure query keys", or "why did this cache entry disappear" -> this skilluseMutation, optimistic updates, invalidation from mutation callbacks, persistence, or offline resumes ->tanstack-query-mutations-and-sync- server prefetching, hydration, Next.js, streaming, or
HydrationBoundary->tanstack-query-integration-and-rendering queryOptionstyping,skipToken, module augmentation, tests, or ESLint rules ->tanstack-query-typescript-and-tooling