Tanstack Query
Performance-focused TanStack Query v5 guide covering query keys, caching, mutations, prefetching, and more.
- CCM score
- 51 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 228
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers 40 rules across 8 prioritized categories: query keys, caching, mutations, prefetching, infinite queries, Suspense, error handling, and render optimization
- Organizes rules by impact level, with critical items such as query key structure and staleTime versus gcTime configuration listed first
- Provides incorrect and correct code examples for each rule, with explanations of why the pattern matters
- Designed for writing or refactoring data fetching code, reviewing for request waterfalls, and implementing optimistic updates; excludes OpenAPI hook generation and test mocking
Install
$ npx -y skills add pproenca/dot-skills --skill tanstack-query -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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)
Details
- Repository
- github.com/pproenca/dot-skills
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the tanstack-query skill do?
The tanstack-query skill gives performance optimization guidance for TanStack Query v5 data fetching, caching, mutations and query patterns. It covers useQuery, useMutation, queryClient, prefetch patterns and caching. It holds 40 rules across 8 categories, ordered by impact.
How do I install the tanstack-query skill?
Run npx -y skills add pproenca/dot-skills --skill tanstack-query -y in a project to install it. After that, the tanstack-query skill guides the agent when it writes or reviews TanStack Query code.
Where does tanstack-query sit in the Frontend & UI Code category?
The tanstack-query skill is listed in the Frontend & UI Code category. It sits alongside vercel-react-best-practices, web-design-guidelines and design-taste-frontend. It stays focused on TanStack Query caching and query patterns rather than general UI design.
Does tanstack-query generate query hooks from OpenAPI or mock API responses in tests?
No, the tanstack-query skill does not cover either task. Generating query hooks from OpenAPI is handled by the orval skill. Mocking API responses in tests is handled by the test-msw skill.
When should I use the tanstack-query skill?
Use the tanstack-query skill when writing new queries, mutations or data fetching logic, or when setting up staleTime and gcTime caching. It also helps when reviewing code for request waterfalls or refactoring existing TanStack Query code.
More from pproenca/dot-skills
All 100- Msw926
- Clean Code879
- Terminal Ui879
- Ui Design844
- Typescript Refactor820
- React Refactor811
- Chrome Extension Ui753
- Shadcn747
- Chrome Extension742
- Shell718
- Tailwind674
- Refactor668
- Expo575
- React513
- Tailwind Responsive Ui487
- Tailwind Ui Refactor480
- Zustand472
- Debug458
- Ios Design454
- Feature Arch445
- Feature Spec444
- React Testing Library436
- Expo React Native Coder428
- Tdd428
Similar to Tanstack Query
More Frontend & UI Codeperformanceyonatangross/orchestkit222 installsCatalog-style performance skill covering Web Vitals, rendering, loading, backend profiling, LLM inference, and sustainability.
state-managementasyrafhussin/agent-skills877 installsVersioned React Query and Zustand patterns for data fetching, caching, mutations, and client state.
performance-optimizationaddyosmani/agent-skills88.5K installsMeasurement-first performance workflow covering frontend Core Web Vitals, backend APIs, and database query bottlenecks.
react-data-fetchingpatternsdev/skills1.2K installsPractical React data fetching patterns covering TanStack Query, SWR, Suspense, parallel loading, and prefetching.
apollo-clientapollographql/skills6K installsGuide for building React apps with Apollo Client 4.x covering queries, mutations, caching, and local state.
headless-caching-strategyvtex/skills1.2K installsHeadless VTEX caching guide: which APIs to cache, TTLs, and which must never be cached.