TanStack Query v5 performance optimization for data fetching, caching, mutations, and query patterns. This skill should be used when using useQuery, useMutation, queryClient, prefetch patterns, or TanStack Query caching. This skill does NOT cover generating query hooks from OpenAPI (use orval skill) or mocking API responses in tests (use test-msw skill).
A comprehensive performance optimization guide for TanStack Query v5 applications.
This skill contains 40 rules across 8 categories, prioritized by impact to guide code generation, refactoring, and review. It's designed for AI agents and LLMs working with React/TanStack Query codebases.
| Priority | Category | Rules | Description | |----------|----------|-------|-------------| | 1 | Query Key Structure | 6 | Key factories, hierarchy, serialization | | 2 | Caching Configuration | 6 | staleTime, gcTime, invalidation | | 3 | Mutation Patterns | 5 | Optimistic updates, rollback | | 4 | Prefetching & Waterfalls | 5 | Parallel fetching, hoisting | | 5 | Infinite Queries | 4 | maxPages, pagination | | 6 | Suspense Integration | 4 | Error boundaries, parallel queries | | 7 | Error & Retry | 5 | Retry strategies, global handling | | 8 | Render Optimization | 5 | select, notifyOnChangeProps |
The skill is automatically applied when working with TanStack Query code. Reference individual rules or AGENTS.md for comprehensive guidance.
Read SKILL.md for the quick reference, or dive into specific rule files under rules/ for detailed examples.
1.0.0 - January 2026
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer