tanstack-query
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, migrate, or plan TanStack Query v5 React server-state code with current docs. Use for @tanstack/react-query, QueryClient, QueryClientProvider, useQuery, useMutation, useInfiniteQuery, useQueries, queryOptions, mutationOptions, query keys, cache defaults, staleTime, gcTime, invalidation, optimistic updates, SSR, hydration, prefetching, router integration, suspense, persistence, devtools, ESLint rules, testing, TypeScript, and v4-to-v5 migrations.
21 other projects use a version of this.
Adopted by
Most recently taken up by
- marcioaltoe/skillstheir own version, first seen Nov 29, 2026
- dvaJi/argostheir own version, first seen Nov 23, 2026
- yuan-alex/cedartheir own version, first seen Nov 8, 2026
- PyModel/react-frontend-skillstheir own version, first seen Nov 3, 2026
- thongdn-it/react-agent-skillstheir own version, first seen Nov 1, 2026
- kriscard/Skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use clean-code, review and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xenitV1Skillclean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 3 projects that use this
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- Kiranism/next-shadcn-dashboard-starter★ 7.3ksame name
- modrinth/code★ 2.6ksame name
- operately/operately★ 627same name
- Mindrally/skills★ 275same name
- TangleML/tangle-ui★ 104same name
- PyModel/react-frontend-skills★ 42same name
- louisbrulenaudet/monorepo-template★ 19same name
- kriscard/Skills★ 16same name
- Firzus/agent-skills★ 6same name
- thongdn-it/react-agent-skills★ 5same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches TanStack Query v5, especially @tanstack/react-query, server-state caching, query/mutation lifecycle …
- Distinctive: line 26
Treat TanStack Query as server-state management, not a replacement for local client UI state.
- Distinctive: line 28
Prefer object syntax everywhere in v5.
- Very specific: line 29
Prefer typed queryOptions and mutationOptions helpers for reusable queries and mutations.
- Very specific: line 31
Use targeted invalidation as the default after mutations.
- Distinctive: line 38
Prefer the repo's existing checks.
“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TanStack Query
Use this skill when work touches TanStack Query v5, especially @tanstack/react-query, server-state caching, query/mutation lifecycle issues, SSR hydration, or migrations from React Query/TanStack Query v4.
Workflow
- Inspect the local Query shape before changing code:
- Package versions for
@tanstack/react-query,@tanstack/query-core, devtools, persist/broadcast packages, ESLint plugin, React, framework router, and test utilities. - Provider setup:
QueryClient,QueryClientProvider, SSR request scoping, default options, devtools, and persistence providers. - Query conventions: query key factories,
queryOptions,mutationOptions, custom hooks, router loaders, SSR prefetching, and invalidation helpers. - Runtime intent: client-only fetching, server prefetch and hydration, route preloading, offline/persistence, or multi-tab sync.
- Package versions for
- Refresh docs for current behavior, package drift, SSR, persistence, or migrations. Start from source-map.md.
- For installation, provider setup, defaults, query keys,
useQuery, and TypeScript options, use setup-core.md. - For dependent, parallel, paginated, infinite, disabled, cancellable, selected, and performance-sensitive queries, use query-patterns.md.
- For
useMutation, invalidation, direct cache writes, optimistic updates, mutation scopes, and offline mutations, use mutations-cache.md. - For prefetching, router integration, SSR, hydration, Suspense, Server Components, and streaming caveats, use ssr-prefetching.md.
- For persistence, broadcast sync, devtools, ESLint, testing, and migration checks, use production-tooling.md.
Implementation Judgment
- Treat TanStack Query as server-state management, not a replacement for local client UI state.
- Query keys are cache identity. Include every changing variable used by the query function, and keep keys serializable.
- Prefer object syntax everywhere in v5. Do not reintroduce positional v3/v4 signatures.
- Prefer typed
queryOptionsandmutationOptionshelpers for reusable queries and mutations. - Set
staleTimedeliberately. Default stale data refetches on mount, window focus, and reconnect can be correct, but noisy when misunderstood. - Use targeted invalidation as the default after mutations. Use immutable
setQueryDatawhen the mutation response already contains the exact updated object. - For optimistic updates, prefer UI-level
variableswhen only one surface needs the pending state; use cache-levelonMutaterollback when multiple surfaces must react. - In SSR, create request-scoped query clients on the server and a stable browser client. Avoid module-level server caches that leak data across users.
- In tests, isolate each test with its own
QueryClient, turn retries off, and clear or recreate clients rather than sharing cache state.
Verification
Prefer the repo's existing checks. For meaningful TanStack Query changes, include the relevant subset:
- Typecheck for query keys, query function returns,
select, mutation variables, and SSR hydration types. - Focused tests for invalidation, optimistic rollback, cache updates, dependent queries, pagination, infinite queries, and error states.
- Browser smoke for loading, stale-data, background-fetching, pagination, mutation pending/error, hydration, and focus/reconnect behavior.
- SSR or route-loader smoke when changing prefetching, hydration, stale times, or provider placement.
- ESLint Query plugin checks when the repo uses
@tanstack/eslint-plugin-query.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

