
Tanstack Query
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.
- skills.sh installs
- 858
- GitHub stars
- 222
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pproenca/dot-skills --skill tanstack-query --agent claude-codeInstalls into .claude/skills of the current project.
Files
TanStack Query Best Practices
Comprehensive performance optimization guide for TanStack Query v5 applications. Contains 40 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new queries, mutations, or data fetching logic
- Implementing caching strategies (staleTime, gcTime)
- Reviewing code for performance issues or request waterfalls
- Refactoring existing TanStack Query code
- Implementing infinite queries, Suspense, or optimistic updates
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Query Key Structure | CRITICAL | tquery- |
| 2 | Caching Configuration | CRITICAL | cache- |
| 3 | Mutation Patterns | HIGH | mutation- |
| 4 | Prefetching & Waterfalls | HIGH | prefetch- |
| 5 | Infinite Queries | MEDIUM | infinite- |
| 6 | Suspense Integration | MEDIUM | suspense- |
| 7 | Error & Retry Handling | MEDIUM | error- |
| 8 | Render Optimization | LOW-MEDIUM | render- |
Quick Reference
1. Query Key Structure (CRITICAL)
Sponsors
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Frontend Development, Backend & APIs, Testing & QA, Debugging
- First seen
- Jun 3, 2026
More from pproenca/dot-skills
All 100- Clean Code857
- Terminal Ui853
- Ui Design827
- Typescript Refactor799
- React Refactor791
- Chrome Extension Ui732
- Shadcn732
- Chrome Extension729
- Shell704
- Tailwind657
- Refactor651
- Expo561
- React496
- Tailwind Responsive Ui470
- Tailwind Ui Refactor467
- Zustand453
- Debug444
- Ios Design436
- Feature Spec431
- Feature Arch423
- React Testing Library418
- Jscodeshift416
- Expo React Native Coder415
- Tdd415