Agent skill

Tanstack Integration Best Practices

by DeckardGer in DeckardGer/tanstack-agent-skills

Best practices for integrating TanStack Query with TanStack Router and TanStack Start.

MITAuto-check passedBackend & APIs

Install Tanstack Integration Best Practices

skills CLI
$ npx skills add DeckardGer/tanstack-agent-skills --skill tanstack-integration-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DeckardGer/tanstack-agent-skills tanstack-integration-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DeckardGer/tanstack-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tanstack-integration .claude/skills/tanstack-integration-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tanstack-integration-best-practices
GitHub stars
222
Token cost
~644 tokens
SKILL.md length
252 words
Files
5
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Best practices for integrating TanStack Query with TanStack Router and TanStack Start.

  • Works in 4 steps: Explanation — Why this pattern matters → Bad Example — Anti-pattern to avoid → Good Example — Recommended implementation → …
  • Tasks that involve Caching
  • SKILL.md covers When to Apply, Rule Categories by Priority, Quick Reference and How to Use, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tanstack Integration Best Practices is an agent skill from DeckardGer/tanstack-agent-skills. Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `rules/cache-single-source.md`, `rules/flow-loader-query-pattern.md` and `rules/setup-query-client-context.md`).

It sits in Backend & APIs, covering Caching. It works with TanStack. The repository describes itself as: TanStack Agent Skills: Best practices for TanStack Query, Router, and Start for AI coding agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Caching

Example prompts

  • “/tanstack-integration-best-practices”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Explanation — Why this pattern matters
  2. Bad Example — Anti-pattern to avoid
  3. Good Example — Recommended implementation
  4. Context — When to apply or skip this rule

What it can do on your machine

Read from SKILL.md and the folder at commit b2fc14c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tanstack Integration Best Practices loads about 644 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 252 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~644

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DeckardGer/tanstack-agent-skills at commit b2fc14c, republished under its MIT licence (© DeckardGer). 252 words, ~644 tokens.

Download SKILL.mdSave it as .claude/skills/tanstack-integration-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
tanstack-integration-best-practices
description
Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

TanStack Integration Best Practices

Guidelines for integrating TanStack Query, Router, and Start together effectively. These patterns ensure optimal data flow, caching coordination, and type safety across the stack.

When to Apply

  • Setting up a new TanStack Start project
  • Integrating TanStack Query with TanStack Router
  • Configuring SSR with query hydration
  • Coordinating caching between router and query
  • Setting up type-safe data fetching patterns

Rule Categories by Priority

PriorityCategoryRulesImpact
CRITICALSetup3 rulesFoundational configuration
CRITICALSSR Integration1 ruleRouter + Query SSR setup
HIGHData Flow4 rulesCorrect data fetching patterns
MEDIUMCaching3 rulesPerformance optimization
MEDIUMSSR2 rulesAdditional SSR patterns

Quick Reference

Setup (Prefix: setup-)
  • setup-query-client-context — Pass QueryClient through router context
  • setup-provider-wrapping — Correctly wrap with QueryClientProvider
  • setup-stale-time-coordination — Coordinate staleTime between router and query
Data Flow (Prefix: flow-)
  • flow-loader-query-pattern — Use loaders with ensureQueryData
  • flow-suspense-query-component — Use useSuspenseQuery in components
  • flow-mutations-invalidation — Coordinate mutations with query invalidation
  • flow-server-functions-queries — Use server functions for query functions
Caching (Prefix: cache-)
  • cache-single-source — Let TanStack Query manage caching
  • cache-preload-coordination — Coordinate preloading between router and query
  • cache-invalidation-patterns — Unified invalidation patterns
SSR Integration (Prefix: ssr-)
  • ssr-dehydrate-hydrate — Use setupRouterSsrQueryIntegration for automatic SSR
Additional SSR (Prefix: ssr-)
  • ssr-per-request-client — Create QueryClient per request
  • ssr-streaming-queries — Handle streaming with queries

How to Use

Each rule file in the rules/ directory contains:

  1. Explanation — Why this pattern matters
  2. Bad Example — Anti-pattern to avoid
  3. Good Example — Recommended implementation
  4. Context — When to apply or skip this rule

Full Reference

See individual rule files in rules/ directory for detailed guidance and code examples.

© DeckardGer, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in skills/tanstack-integration of DeckardGer/tanstack-agent-skills.

  • SKILL.md
  • rules/cache-single-source.md
  • rules/flow-loader-query-pattern.md
  • rules/setup-query-client-context.md
  • rules/ssr-dehydrate-hydrate.md

Open the folder on GitHubat commit b2fc14c

Compare with similar skills

Tanstack Integration Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tanstack Integration Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tanstack Integration Best Practices this skillDeckardGer/tanstack-agent-skills222—~644Automated safety check: PassMIT
Trpc PatternsFranciscoMoretti/chat-js1.2k—~288Automated safety check: PassApache-2.0
Nextjs Data Fetchinggiuseppe-trisciuoglio/developer-kit355—~2.2kAutomated safety check: NotesMIT
Tanstack AI Core Middlewaremajiayu000/claude-skill-registry6661 repos~9.9kAutomated safety check: NotesMIT
Public QA Chatbotswyxio/skills172—~9.8kAutomated safety check: PassMIT
Olore Tanstack Query 4olorehq/olore103—~583Automated safety check: PassMIT

Similar skills

  • Trpc Patterns

    FranciscoMoretti/chat-js

    Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

    1.2k GitHub stars~288 tokensUpdated today
    Backend & APIsAuto-check passed
  • Nextjs Data Fetching

    giuseppe-trisciuoglio/developer-kit

    Provides Next.js App Router data fetching patterns including SWR and React Query integration, parallel data fetching, Incremental Static Regeneration (ISR), revalidation strategies, and error…

    355 GitHub stars~2.2k tokensUpdated 27 days ago
    Backend & APIsAuto-check: notes
  • Tanstack AI Core Middleware

    majiayu000/claude-skill-registry

    Chat lifecycle middleware hooks: onConfig, onStart, onChunk, onBeforeToolCall, onAfterToolCall, onUsage, onFinish, onAbort, onError.

    666 GitHub starsUsed in 1 repo~9.9k tokens
    Backend & APIsAuto-check: notes
  • Public QA Chatbot

    swyxio/skills

    Best practices for building an unauthenticated public Q&A chatbot widget.

    172 GitHub stars~9.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Local TanStack Query documentation reference (v4). An agent skill from olorehq/olore.

    103 GitHub stars~583 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes

More from DeckardGer/tanstack-agent-skills

  • Tanstack Query Best Practices

    DeckardGer/tanstack-agent-skills

    TanStack Query (React Query) best practices for data fetching, caching, mutations, and server state management.

    222 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Tanstack Router Best Practices

    DeckardGer/tanstack-agent-skills

    TanStack Router best practices for type-safe routing, data loading, search params, and navigation.

    222 GitHub stars~1.1k tokensUpdated 28 days ago
    Auto-check passed
  • Tanstack Start Best Practices

    DeckardGer/tanstack-agent-skills

    TanStack Start best practices for full-stack React applications.

    222 GitHub stars~1k tokensUpdated 28 days ago
    Auto-check passed

Works with

Categories

Questions about Tanstack Integration Best Practices

What does Tanstack Integration Best Practices do?

Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Tanstack Integration Best Practices is an agent skill from DeckardGer/tanstack-agent-skills. Best practices for integrating TanStack Query with TanStack Router and TanStack Start.

When should I use Tanstack Integration Best Practices?

Tanstack Integration Best Practices fits situations like: tasks that involve Caching.

How do I install Tanstack Integration Best Practices in Claude Code?

Run `npx skills add DeckardGer/tanstack-agent-skills --skill tanstack-integration-best-practices -a claude-code`. Or copy the skill folder (skills/tanstack-integration in DeckardGer/tanstack-agent-skills) into .claude/skills/tanstack-integration-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Tanstack Integration Best Practices in Codex?

Run `npx skills add DeckardGer/tanstack-agent-skills --skill tanstack-integration-best-practices -a codex`. Or copy the skill folder (skills/tanstack-integration in DeckardGer/tanstack-agent-skills) into .agents/skills/tanstack-integration-best-practices in your project. Codex loads it when a task matches its description.

Can I use Tanstack Integration Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DeckardGer/tanstack-agent-skills --skill tanstack-integration-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tanstack-integration-best-practices, .gemini/skills/tanstack-integration-best-practices, .github/skills/tanstack-integration-best-practices and .opencode/skills/tanstack-integration-best-practices in your project.

What does Tanstack Integration Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Tanstack Integration Best Practices is instructions for the agent only.

Does Tanstack Integration Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tanstack Integration Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tanstack Integration Best Practices use?

Tanstack Integration Best Practices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tanstack Integration Best Practices use?

About 644 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tanstack Integration Best Practices?

Skills that share tags, products or a category with Tanstack Integration Best Practices: Trpc Patterns (FranciscoMoretti/chat-js, 1.2k stars), Nextjs Data Fetching (giuseppe-trisciuoglio/developer-kit, 355 stars), Tanstack AI Core Middleware (majiayu000/claude-skill-registry, 666 stars) and Public QA Chatbot (swyxio/skills, 172 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tanstack Integration Best Practices?

DeckardGer (a GitHub user) maintains it in DeckardGer/tanstack-agent-skills, which has 222 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 9, 2026.

Source: DeckardGer/tanstack-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.