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 Cratis/AI --skill tanstack-querygit clone --depth 1 https://github.com/Cratis/AIWrote 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/cratis/ai/tanstack-query)<a href="https://agentmods.dev/skills/cratis/ai/tanstack-query"><img src="https://agentmods.dev/badge/skills/cratis/ai/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/cratis/ai/tanstack-query"><img src="https://agentmods.dev/badge/skills/cratis/ai/tanstack-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00041 | $0.01228 |
| Opus 5.5 | $0.00016 | $0.00491 |
| Sonnet 5.5 | $0.00008 | $0.00246 |
| Haiku 4.5 | $0.00004 | $0.00123 |
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 1mo 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
100% identical to tanstack-query — 2 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 — 124 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 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.9 KB
- references/cache-enabled-option.md 2.0 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.0 KB
- references/mutation-cancel-queries.md 2.0 KB
- references/mutation-invalidate-onsettled.md 1.9 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.0 KB
- references/prefetch-in-queryfn.md 1.9 KB
- references/prefetch-on-hover.md 2.0 KB
- references/prefetch-server-components.md 2.2 KB
- references/render-notify-props.md 2.1 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.
- 1mo ago Changed · -38 tokens per session 84f36a49df8e
- 2mo ago First seen · 124 lines · 79 tokens per session scan A 2df31e8c38d7
tanstack-query is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 1,228 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to tanstack-query, differing in 2 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-queryCratis/AI | Skill | 4 | today | MIT | A | 41 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |