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-side useSuspenseQuery
  • dependent, parallel, paginated, and infinite-query selection
  • cache freshness defaults like staleTime and gcTime
  • 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 skill
  • useMutation, 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
  • queryOptions typing, skipToken, module augmentation, tests, or ESLint rules -> tanstack-query-typescript-and-tooling
Related skills
Installs
3
GitHub Stars
1
First Seen
Mar 24, 2026