tanstack-query

tanstack-query is a skill for Claude Code, Codex from miketromba/skills. It costs 86 tokens per session (2,873 once invoked), scanned A, original, MIT.

Documentation and guidance for TanStack Query, a library that fetches data from servers and keeps it available in an application. It covers React, Vue, Solid, Svelte, and Angular usage.

In plain words
What is it for?
Use it when working with queries, mutations, cache updates, query invalidation, or other TanStack Query features. The guidance also describes how to research its documentation.
Why use it?
It helps manage loading, cached, synchronized, and updated server data without designing these behaviors from scratch.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/miketromba/skills/tanstack-query
Any agent
npx skills add miketromba/skills --skill tanstack-query
Clone the repo
git clone --depth 1 https://github.com/miketromba/skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for tanstack-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/miketromba/skills/tanstack-query.svg)](https://agentmods.dev/skills/miketromba/skills/tanstack-query)
Your own site
<a href="https://agentmods.dev/skills/miketromba/skills/tanstack-query"><img src="https://agentmods.dev/badge/skills/miketromba/skills/tanstack-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,873 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00086 $0.02873
Opus 5 $0.00043 $0.01437
Sonnet 5 $0.00017 $0.00575
Haiku 4.5 $0.00009 $0.00287

Measured 4d ago against content hash 76b1d9b0e82a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 4d 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.

skills/tanstack-query/SKILL.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TanStack Query

TanStack Query (formerly React Query) is a powerful async state management library for fetching, caching, synchronizing, and updating server state in your applications. It works with React, Vue, Solid, Svelte, and Angular.

Important: Fetching Documentation

CRITICAL: When fetching TanStack Query documentation pages, always append .md to the URL to get the markdown version for optimal readability.

# ❌ Don't fetch this:
https://tanstack.com/query/latest/docs/framework/react/overview

# ✅ Fetch this instead:
https://tanstack.com/query/latest/docs/framework/react/overview.md

This applies to ALL documentation links from TanStack.

Research Process

To answer questions about TanStack Query, spawn a sub-agent to conduct thorough documentation research.

Launch a Research Sub-Agent

Use the Task tool to spawn a sub-agent dedicated to TanStack Query documentation research. Do NOT specify a model (use the default model for comprehensive research quality).

Critical: Provide the sub-agent with a highly detailed prompt that includes:

  1. Goal - What you are ultimately trying to accomplish
  2. Context - Why you need this information and how it fits into the larger task
  3. Specific Questions - Exactly what information you need answered
  4. Output Requirements - The format and level of detail needed in the response

Task Tool Configuration

Task tool parameters:
- description: "Research TanStack Query docs"
- subagent_type: "generalPurpose"
- model: (DO NOT SPECIFY - use default for thorough research)
- readonly: true
- prompt: (see template below)

Prompt Template for Sub-Agent

Structure your prompt to the research sub-agent as follows:

You are researching TanStack Query documentation to help with a specific task.

## Your Research Goal
[Describe exactly what you need to accomplish with this information]

## Context
[Explain why you need this information and how it will be used]

## Specific Questions to Answer
[List the specific questions that need to be answered]

## Research Process

**IMPORTANT**: When fetching any TanStack documentation page, ALWAYS append `.md` to the URL to get the markdown version. For example:
- https://tanstack.com/query/latest/docs/framework/react/overview.md
- https://tanstack.com/query/latest/docs/framework/react/guides/queries.md

1. First, fetch the main TanStack Query overview:
   URL: https://tanstack.com/query/latest/docs/framework/react/overview.md

2. Based on the questions above, identify and fetch relevant documentation pages. Key documentation sections:

   **Getting Started:**
   - Overview: https://tanstack.com/query/latest/docs/framework/react/overview.md
   - Installation: https://tanstack.com/query/latest/docs/framework/react/installation.md
   - Quick Start: https://tanstack.com/query/latest/docs/framework/react/quick-start.md
   - Devtools: https://tanstack.com/query/latest/docs/framework/react/devtools.md
   - TypeScript: https://tanstack.com/query/latest/docs/framework/react/typescript.md

   **Core Guides:**
   - Queries: https://tanstack.com/query/latest/docs/framework/react/guides/queries.md
   - Query Keys: https://tanstack.com/query/latest/docs/framework/react/guides/query-keys.md
   - Query Functions: https://tanstack.com/query/latest/docs/framework/react/guides/query-functions.md
   - Parallel Queries: https://tanstack.com/query/latest/docs/framework/react/guides/parallel-queries.md
   - Dependent Queries: https://tanstack.com/query/latest/docs/framework/react/guides/dependent-queries.md
   - Background Fetching: https://tanstack.com/query/latest/docs/framework/react/guides/background-fetching-indicators.md
   - Window Focus Refetching: https://tanstack.com/query/latest/docs/framework/react/guides/window-focus-refetching.md
   - Disabling Queries: https://tanstack.com/query/latest/docs/framework/react/guides/disabling-queries.md
   - Query Retries: https://tanstack.com/query/latest/docs/framework/react/guides/query-retries.md
   - Paginated Queries: https://tanstack.com/query/latest/docs/framework/react/guides/paginated-queries.md
   - Infinite Queries: https://tanstack.com/query/latest/docs/framework/react/guides/infinite-queries.md
   - Placeholder Data: https://tanstack.com/query/latest/docs/framework/react/guides/placeholder-query-data.md
   - Initial Query Data: https://tanstack.com/query/latest/docs/framework/react/guides/initial-query-data.md
   - Prefetching: https://tanstack.com/query/latest/docs/framework/react/guides/prefetching.md

   **Mutations:**
   - Mutations: https://tanstack.com/query/latest/docs/framework/react/guides/mutations.md
   - Optimistic Updates: https://tanstack.com/query/latest/docs/framework/react/guides/optimistic-updates.md
   - Query Invalidation: https://tanstack.com/query/latest/docs/framework/react/guides/query-invalidation.md
   - Invalidation from Mutations: https://tanstack.com/query/latest/docs/framework/react/guides/invalidations-from-mutations.md
   - Updates from Mutation Responses: https://tanstack.com/query/latest/docs/framework/react/guides/updates-from-mutation-responses.md

   **Caching & Performance:**
   - Caching: https://tanstack.com/query/latest/docs/framework/react/guides/caching.md
   - Default Query Function: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function.md
   - Suspense: https://tanstack.com/query/latest/docs/framework/react/guides/suspense.md
   - Filters: https://tanstack.com/query/latest/docs/framework/react/guides/filters.md

   **Server-Side Rendering:**
   - SSR: https://tanstack.com/query/latest/docs/framework/react/guides/ssr.md
   - Advanced SSR: https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr.md

   **Testing:**
   - Testing: https://tanstack.com/query/latest/docs/framework/react/guides/testing.md

   **API Reference:**
   - useQuery: https://tanstack.com/query/latest/docs/framework/react/reference/useQuery.md
   - useMutation: https://tanstack.com/query/latest/docs/framework/react/reference/useMutation.md
   - useQueryClient: https://tanstack.com/query/latest/docs/framework/react/reference/useQueryClient.md
   - useInfiniteQuery: https://tanstack.com/query/latest/docs/framework/react/reference/useInfiniteQuery.md
   - useSuspenseQuery: https://tanstack.com/query/latest/docs/framework/react/reference/useSuspenseQuery.md
   - useQueries: https://tanstack.com/query/latest/docs/framework/react/reference/useQueries.md
   - useIsFetching: https://tanstack.com/query/latest/docs/framework/react/reference/useIsFetching.md
   - useMutationState: https://tanstack.com/query/latest/docs/framework/react/reference/useMutationState.md
   - QueryClient: https://tanstack.com/query/latest/docs/reference/QueryClient.md
   - QueryClientProvider: https://tanstack.com/query/latest/docs/framework/react/reference/QueryClientProvider.md

3. Remember to append .md to ALL documentation URLs before fetching!

4. Fetch multiple relevant pages in parallel using WebFetch.

## Required Output
[Specify exactly what format and content you need returned]

Provide a comprehensive response with all findings, including relevant code examples, configuration snippets, and step-by-step instructions where applicable.

Read the full file on GitHub · 290 lines

Changes

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.

  1. 4d ago First seen · 290 lines · 86 tokens per session scan A 76b1d9b0e82a

Subscribe to this mod's changes

tanstack-query is a skill published in the GitHub repository miketromba/skills (2 stars, last pushed 8d ago), licensed MIT. It adds 86 tokens to every session and 2,873 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

tanstack-form

Headless, performant, and type-safe form state management for TS/JS, React, Vue, Angular, Solid, Lit, and Svelte.

Kiranism/next-shadcn-dashboard-starter · 34 tokens

livecodes/framework-wrappers

Use SDK with React, Vue, Svelte, Solid, Preact, and Web Components. sdkReady callback pattern, reactive props, and framework-specific setup. Load this skill when embedding LiveCodes in a framework application.

live-codes/livecodes · 51 tokens

markstream-install

Install and wire markstream-vue, markstream-react, markstream-vue2, markstream-angular, or markstream-svelte into an existing repository. Use when Codex needs to choose the right package, install the smallest framework-specific peer-dependency set, fix CSS/reset order, choose Vue 3 renderer mode and built-in, plain…

Simon-He95/markstream-vue · 104 tokens

formkit

Use when working with FormKit forms, validation, schema, or custom inputs in React, Vue, or Nuxt projects.

formkit/formkit · 28 tokens

portable-text-serialization

Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown…

sanity-io/agent-toolkit · 85 tokens

frontend-ux-engineer

Use for frontend features, Next.js/React/Vue/Svelte UI, accessibility, responsive layout, design polish, state handling, forms, visual QA, or product workflow improvements.

DominikTobureto/awesome-grok-build · 42 tokens