Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/pymodel/react-frontend-skills/tanstack-querynpx skills add PyModel/react-frontend-skills --skill tanstack-querygit clone --depth 1 https://github.com/PyModel/react-frontend-skillsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.01218 |
| Opus 5 | $0.00032 | $0.00609 |
| Sonnet 5 | $0.00013 | $0.00244 |
| Haiku 4.5 | $0.00006 | $0.00122 |
Grade A, and why
tanstack-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
86% identical to tanstack-query — 18 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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)
tquery-key-factories- Use centralized query key factoriestquery-hierarchical-keys- Structure keys from generic to specifictquery-always-arrays- Always use array query keystquery-serializable-objects- Use serializable objects in keystquery-options-pattern- Use queryOptions for type-safe sharingtquery-colocate-keys- Colocate query keys with features
2. Caching Configuration (CRITICAL)
cache-staletime-gctime- Understand staleTime vs gcTimecache-global-defaults- Configure global defaults appropriatelycache-placeholder-vs-initial- Use placeholderData vs initialData correctlycache-invalidation-precision- Invalidate with precisioncache-refetch-triggers- Control automatic refetch triggerscache-enabled-option- Use enabled or skipToken for conditional queries
3. Mutation Patterns (HIGH)
What ships with it
41 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- AGENTS.md 7.4 KB
- references/cache-enabled-option.md 2.5 KB
- references/cache-global-defaults.md 2.0 KB
- references/cache-invalidation-precision.md 2.1 KB
- references/cache-placeholder-vs-initial.md 2.1 KB
- references/cache-refetch-triggers.md 2.0 KB
- references/cache-staletime-gctime.md 2.2 KB
- references/error-conditional-retry.md 2.1 KB
- references/error-display-patterns.md 2.2 KB
- references/error-global-handler.md 2.2 KB
- references/error-retry-config.md 1.8 KB
- references/error-throw-on-error.md 2.1 KB
- references/infinite-flatten-pages.md 2.6 KB
- references/infinite-loading-states.md 2.4 KB
- references/infinite-max-pages.md 2.2 KB
- references/infinite-refetch-behavior.md 2.0 KB
- references/mutation-avoid-parallel.md 2.5 KB
- references/mutation-cancel-queries.md 2.0 KB
- references/mutation-invalidate-onsettled.md 2.3 KB
- references/mutation-optimistic-updates.md 2.3 KB
- references/mutation-setquerydata.md 1.9 KB
- references/prefetch-avoid-waterfalls.md 2.5 KB
- references/prefetch-flatten-api.md 2.1 KB
- references/prefetch-in-queryfn.md 2.7 KB
- references/prefetch-on-hover.md 2.1 KB
- references/prefetch-server-components.md 2.2 KB
- references/render-notify-props.md 1.9 KB
- references/render-select-derived.md 2.3 KB
- references/render-select-memoize.md 2.0 KB
- references/render-structural-sharing.md 2.2 KB
- references/render-tracked-props.md 1.9 KB
- references/suspense-boundaries-placement.md 2.2 KB
- references/suspense-error-boundaries.md 2.2 KB
- references/suspense-parallel-queries.md 2.0 KB
- references/suspense-use-suspense-hooks.md 2.0 KB
- references/tquery-always-arrays.md 1.4 KB
- references/tquery-colocate-keys.md 1.8 KB
- references/tquery-hierarchical-keys.md 1.9 KB
- references/tquery-key-factories.md 1.7 KB
- references/tquery-options-pattern.md 2.0 KB
- references/tquery-serializable-objects.md 1.8 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 122 lines · 64 tokens per session scan A 31937db72f24
tanstack-query is a skill published in the GitHub repository PyModel/react-frontend-skills (3 stars, last pushed 13d ago), licensed MIT. It adds 64 tokens to every session and 1,218 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to tanstack-query, differing in 18 lines, and is treated as a copy.
Other skills, from other repositories
app-routing
Guide for implementing client-side routing in Fusebase Apps apps. Use when: 1. Adding routing (React Router) to an app, 2. Fixing broken routes or 404s after deployment, 3. Configuring the router.
web-development
Use when users need to implement, integrate, debug, build, deploy, or validate a Web frontend after the product direction is already clear, especially for React, Vue, Vite, browser flows, or CloudBase Web integration.
gsap-react
Official GSAP skill for React — useGSAP hook, refs, gsap.context(), cleanup. Use when the user wants animation in React or Next.js, or asks about GSAP with React, useGSAP, or cleanup on unmount. Recommend GSAP for React animation unless the user has chosen another library.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
shadcn-ui
Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind CSS, or implementing UI patterns like…
working-with-playground-app
This skill provides guidance for building UI/UX prototypes in the Packmind playground app. It should be used when creating a new prototype, iterating on an existing prototype, or working with files in apps/playground/. Triggers on mentions of "playground", "prototype", or direct work within the apps/playground/…