Skip to content
pproenca avatar

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
View on GitHub

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 -y

Installs 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

PriorityCategoryImpactPrefix
1Query Key StructureCRITICALtquery-
2Caching ConfigurationCRITICALcache-
3Mutation PatternsHIGHmutation-
4Prefetching & WaterfallsHIGHprefetch-
5Infinite QueriesMEDIUMinfinite-
6Suspense IntegrationMEDIUMsuspense-
7Error & Retry HandlingMEDIUMerror-
8Render OptimizationLOW-MEDIUMrender-

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

Similar to Tanstack Query

More Frontend & UI Code