If you're tired of writing loading states and cache logic for every API call, this handles it automatically. TanStack Query gives you useQuery for fetching data and useMutation for updates, both with built-in caching, background refetching, and request deduplication. The skill covers the full setup from basic queries to optimistic updates, infinite scroll, and SSR hydration. It's genuinely good at separating server state from client state, something most React apps muddle together. The progressive disclosure structure means you get just the setup code when starting out, then deeper patterns like cache invalidation strategies and polling when you need them. Works with any backend, whether REST, GraphQL, or tRPC.

skills.sh installs
595
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill tanstack-query --agent claude-code

Installs into .claude/skills of the current project.

Files

TanStack Query (React Query) Skill

Summary

TanStack Query (formerly React Query) is a powerful asynchronous state management library for React that handles server-state fetching, caching, synchronization, and updates. It eliminates the need for manual data fetching boilerplate and provides built-in features like background refetching, optimistic updates, pagination, and intelligent cache management.

When to Use

Use TanStack Query when:

  • Fetching data from REST APIs, GraphQL, or tRPC endpoints
  • Need automatic background refetching and cache invalidation
  • Building real-time dashboards with polling or websocket data
  • Implementing infinite scroll or pagination
  • Require optimistic UI updates for mutations
  • Managing complex server-state synchronization
  • Need offline support with cache persistence
  • Building applications with frequent data updates

TanStack Query excels at:

  • Server-state management (API data, external state)
  • Request deduplication and caching
  • Stale-while-revalidate patterns
  • Loading and error state management
  • Prefetching and eager loading
  • Parallel and dependent query orchestration

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Frontend Development, Backend & APIs
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1openai avatarslidesopenai/skillsCreate and edit presentation slide decks (`.pptx`) with PptxGenJS, bundled layout helpers, and render/validation utilities. Use when tasks involve building a ne589skills.sh installs
2anthropics avatarinteractive-dashboard-builderanthropics/knowledge-work-pluginsBuild self-contained interactive HTML dashboards with Chart.js, dropdown filters, and professional styling. Use when creating dashboards, building interactive r586skills.sh installs
3alirezarezvani avatarspec-to-repoalirezarezvani/claude-skillsUse when the user says 'build me an app', 'create a project from this spec', 'scaffold a new repo', 'generate a starter', 'turn this idea into code', 'bootstrap578skills.sh installs
4uview-pro avataruview-prouview-pro/skillsuView Pro 组件库完整技能集。Invoke when user needs to use uView Pro components, tools, hooks or layouts in uni-app project.575skills.sh installs
5auth0 avatarauth0-expoauth0/agent-skillsUse when adding Auth0 login, logout, or session management to an Expo app. Integrates react-native-auth0 with the Expo Config Plugin for native iOS/Android buil555skills.sh installs
6manutej avatarfigma-designmanutej/luxor-claude-marketplaceFigma workflows, components, auto layout, constraints, prototyping, design systems, and plugin development based on Figma Plugin API documentation544skills.sh installs