tanstack-query-mutations-and-sync
Installation
SKILL.md
TanStack Query Mutations and Sync
Use this skill when the task is about writing server state, reconciling cache after writes, or keeping that state resilient across offline and multi-tab flows.
Scope
useMutationand write-side lifecycle callbacks- optimistic updates, rollback, and cache reconciliation
- invalidation from mutations and response-driven cache writes
- mutation defaults, retry behavior, and mutation scopes
- offline and paused mutations
- persisted cache, storage persisters, broadcast sync, and devtools
Routing cues
useMutation, optimistic UI, rollback, invalidate after save, or mutation race concerns -> this skill- basic query reads, pagination, invalidation without writes, or cache defaults ->
tanstack-query-fetching-and-cache - SSR, hydration, Next.js integration, or server prefetching ->
tanstack-query-integration-and-rendering - TypeScript helper factories, key registration, tests, or ESLint rules ->
tanstack-query-typescript-and-tooling