Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
deckardger avatar

Tanstack Integration Best Practices

  • 2.3k installs
  • 205 repo stars
  • Updated April 3, 2026
  • deckardger/tanstack-agent-skills

tanstack-integration-best-practices is an agent skill that Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow.

About

Guidelines for integrating TanStack Query Router and Start together effectively These patterns ensure optimal data flow caching coordination and type safety across the stack 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 Priority Category Rules Impact CRITICAL Setup 3 rules Foundational configuration CRITICAL SSR Integration 1 rule Router Query SSR setup HIGH Data Flow 4 rules Correct data fetching patterns MEDIUM Caching 3 rules Performance optimization MEDIUM SSR 2 rules Additional SSR patterns 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 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

  • name: tanstack-integration-best-practices
  • description: Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-st
  • Guidelines for integrating TanStack Query, Router, and Start together effectively. These patterns ensure optimal data fl
  • Follow tanstack-integration-best-practices SKILL.md steps and documented constraints.
  • Follow tanstack-integration-best-practices SKILL.md steps and documented constraints.

Tanstack Integration Best Practices by the numbers

  • 2,265 all-time installs (skills.sh)
  • +49 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #472 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

tanstack-integration-best-practices capabilities & compatibility

Capabilities
name: tanstack integration best practices · description: best practices for integrating tans · guidelines for integrating tanstack query, route · follow tanstack integration best practices skill
Use cases
orchestration
From the docs

What tanstack-integration-best-practices says it does

name: tanstack-integration-best-practices
SKILL.md
description: Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.
SKILL.md
Guidelines for integrating TanStack Query, Router, and Start together effectively. These patterns ensure optimal data flow, caching coordination, and type safety across the stack.
SKILL.md
npx skills add https://github.com/deckardger/tanstack-agent-skills --skill tanstack-integration-best-practices

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.3k
repo stars205
Security audit3 / 3 scanners passed
Last updatedApril 3, 2026
Repositorydeckardger/tanstack-agent-skills

When should an agent use tanstack-integration-best-practices and what problem does it solve?

Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

Who is it for?

Developers invoking tanstack-integration-best-practices as documented in the skill source.

Skip if: Skip when requirements fall outside tanstack-integration-best-practices documented scope.

When should I use this skill?

Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

What you get

Outputs aligned with the tanstack-integration-best-practices SKILL.md workflow and stated deliverables.

  • TanStack Router config with Query as single cache authority

By the numbers

  • Rated MEDIUM priority in tanstack-agent-skills
  • Documents Router defaultPreloadStaleTime of 30000 ms as the conflicting default

Files

SKILL.mdMarkdownGitHub ↗

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.

Related skills

How it compares

Pick tanstack-integration-best-practices when Router and Query run together; use Query-only or Router-only guides when not combining both libraries.

FAQ

What is tanstack-integration-best-practices?

Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

When should I use tanstack-integration-best-practices?

Best practices for integrating TanStack Query with TanStack Router and TanStack Start. Patterns for full-stack data flow, SSR, and caching coordination.

Is tanstack-integration-best-practices safe to install?

Review the Security Audits panel on this page before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.