Skip to content

Server-state management for React with caching, background refetching, optimistic updates, and pagination.

CCM score
53 of 100
skills.sh installs
604
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers query keys, query lifecycle, cache behavior, queries, mutations, and cache invalidation for React Query
  • Includes setup and quick-start examples for useQuery, useMutation, and QueryClientProvider with DevTools
  • Explains the server-state versus client-state split and sets staleTime, gcTime, and refetch options
  • Designed for React apps that fetch REST, GraphQL, or tRPC data and should not handle form or local UI state

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the tanstack-query skill do?

The tanstack-query skill guides an agent through TanStack Query, the React library for server-state management. It covers automatic caching, background refetching, optimistic updates and pagination in React applications.

How do I install the tanstack-query skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill tanstack-query -y in your project. Once installed, tanstack-query lets the agent write React data fetching with useQuery and useMutation.

Where does tanstack-query stand in its category on Claude Marketplaces?

tanstack-query is listed in the Frontend and UI Code category on Claude Marketplaces. The other skills in that category include vercel-react-best-practices, web-design-guidelines and design-taste-frontend.

When should an agent use the tanstack-query skill?

The tanstack-query skill suits REST, GraphQL or tRPC fetching, infinite scroll and real-time dashboards with polling. Its own guidance says to avoid it for pure client state or form state.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Tanstack Query

More Frontend & UI Code