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 skills add PyModel/react-frontend-skills --skill tanstack-querygit clone --depth 1 https://github.com/PyModel/react-frontend-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pymodel/react-frontend-skills/tanstack-query)<a href="https://agentmods.dev/skills/pymodel/react-frontend-skills/tanstack-query"><img src="https://agentmods.dev/badge/skills/pymodel/react-frontend-skills/tanstack-query/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pymodel/react-frontend-skills/tanstack-query"><img src="https://agentmods.dev/badge/skills/pymodel/react-frontend-skills/tanstack-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
What 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.1 | $0.00014 | $0.01174 |
| Opus 5.5 | $0.00006 | $0.00470 |
| Sonnet 5.5 | $0.00003 | $0.00235 |
| Haiku 4.5 | $0.00001 | $0.00117 |
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 20d 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 — 37 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 — 117 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 41 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.
- 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.4 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.9 KB
- references/prefetch-infinite-query.md 2.6 KB
- references/prefetch-on-hover.md 2.3 KB
- references/prefetch-server-components.md 2.4 KB
- references/render-notify-props.md 2.0 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.3 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.1 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.
- 20d ago Changed · -1 lines 23c23cc8677d
- 2mo ago Changed · -4 lines · -50 tokens per session a7dbc5dcf1c0
- 3mo 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 (52 stars, last pushed 20d ago), licensed MIT. It adds 14 tokens to every session and 1,174 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to tanstack-query, differing in 37 lines, and is treated as a copy.
tanstack-query compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tanstack-queryPyModel/react-frontend-skills | Skill | 52 | 20d ago | MIT | A | 14 | Claude Code, Codex |
| lov-install-tanstack-querylovstudio/skills | Skill | 72 | 3d ago | MIT | A | 61 | Claude Code |
| lov-kill-emojilovstudio/skills | Skill | 72 | 3d ago | MIT | A | 48 | Claude Code |
| lov-video-chapter-designlovstudio/skills | Skill | 72 | 3d ago | MIT | A | 51 | Claude Code |
| vercel-react-best-practicescalesthio/OpenMontage | Skill | 84k | 14d ago | AGPL-3.0 | A | 67 | Claude Code, Codex |
| vercel-composition-patternscalesthio/OpenMontage | Skill | 84k | 14d ago | AGPL-3.0 | A | 58 | Claude Code, Codex |
| web-artifacts-builderPrismer-AI/PrismerCloud | Skill | 1.4k | 1mo ago | MIT | A | 63 | Claude Code, Codex |