
Tanstack Query
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-codeInstalls 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- Fastify582
- Api Design Patterns579
- Skill Creator569
- Git Workflow568
- Express Production519
- Golang Grpc518
- Axum500
- Hono Core500
- Zustand496
- Asyncio494
- Mcp Protocol Builder491
- Typescript Core487
- Bug Fix482
- Supabase Backend Platform482
- Mypy478
- Threat Modeling474
- Wordpress Block Editor Fse474
- Celery470
- Web Performance Optimization469
- Local Llm Ops464
- Golang Testing Strategies458
- Wordpress Advanced Architecture455
- Golang Http Frameworks453
- Sveltekit452