This is a comprehensive performance optimization guide for TanStack Query v5 with 40 rules across 8 categories, from query key structure to render optimization. Use it when writing queries and mutations, implementing caching strategies, or debugging request waterfalls. The structure is practical: rules are prioritized by impact (critical to low-medium) and organized with prefixes like `tquery-`, `cache-`, and `mutation-` for quick reference. Each rule includes incorrect and correct code examples. The main value here is consolidating scattered best practices into a single reference that covers the full spectrum from basic staleTime vs gcTime configuration to advanced patterns like optimistic updates with rollback. Pairs well with the orval skill for generating hooks and test-msw for mocking.
npx skills add https://github.com/pproenca/dot-skills --skill tanstack-query