Skip to content
Back to search

tanstack-agent-skills

TanStack Agent Skills: Best practices for TanStack Query, Router, and Start for AI coding agents

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/deckardger--tanstack-agent-skills/badge.svg)](/listings/deckardger--tanstack-agent-skills)

HTML

<a href="/listings/deckardger--tanstack-agent-skills"><img src="/api/listings/deckardger--tanstack-agent-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add DeckardGer/tanstack-agent-skills

Or manually add to your project's `.cursor/` or Claude Code configuration.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 152 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # TanStack Agent Skills
  2. Comprehensive best practices for building applications with the TanStack ecosystem. These skills provide AI coding agents with structured guidelines for TanStack Query, TanStack Router, and TanStack Start.
  3. Skills follow the [Agent Skills](https://agentskills.io/) format.
  4. ## Available Skills
  5. ### [tanstack-query](./skills/tanstack-query/)
  6. Best practices for data fetching, caching, mutations, and server state management with TanStack Query (React Query).
  7. **Use when:**
  8. - Fetching or caching server data with `useQuery` or `useMutation`
  9. - Setting up React Query for a new project
  10. - Reviewing data fetching patterns for performance issues
  11. **32+ rules across 8 categories:**
  12. - Query Keys (CRITICAL) — Proper key structure and organization
  13. - Caching (CRITICAL) — staleTime, gcTime, and invalidation patterns
  14. - Mutations (HIGH) — Optimistic updates, error handling
  15. - Error Handling (HIGH) — Error boundaries, retry logic
  16. - Prefetching (MEDIUM) — Intent-based and route prefetching
  17. - Infinite Queries (MEDIUM) — Pagination patterns
  18. - SSR Integration (MEDIUM) — Hydration and dehydration
  19. - Performance (LOW) — Select transforms, memoization
  20. ### [tanstack-router](./skills/tanstack-router/)
  21. Best practices for type-safe routing, data loading, search params, and navigation with TanStack Router.
  22. **Use when:**
  23. - Setting up routing for a React app
  24. - Working with search params, loaders, or code splitting
  25. - Configuring type-safe navigation
  26. **36 rules across 10 categories:**
  27. - Type Safety (CRITICAL) — Router registration, type narrowing, context typing
  28. - Route Organization (CRITICAL) — File-based routing, route trees, pathless layouts
  29. - Router Config (HIGH) — Global router defaults
  30. - Data Loading (HIGH) — Loaders, Query integration, deferred data
  31. - Search Params (HIGH) — Validation, type inheritance, middleware, defaults
  32. - Error Handling (HIGH) — Not-found routes, error boundaries
  33. - Navigation (MEDIUM) — Link component, active states, programmatic navigation
  34. - Code Splitting (MEDIUM) — Lazy routes, auto splitting, critical path
  35. - Preloading (MEDIUM) — Intent-based, stale time, manual preloading
  36. - Route Context (LOW) — Dependency injection, beforeLoad
  37. ### [tanstack-start](./skills/tanstack-start/)
  38. Best practices for full-stack React applications with TanStack Start, including server functions, middleware, SSR, and authentication.
  39. **Use when:**
  40. - Building full-stack apps with server functions
  41. - Implementing authentication or middleware
  42. - Configuring SSR, streaming, or deployment
  43. **32 rules across 10 categories:**
  44. - Server Functions (CRITICAL) — createServerFn patterns
  45. - Security (CRITICAL) — Input validation, CSRF protection
  46. - Middleware (HIGH) — Request/function middleware
  47. - Authentication (HIGH) — Sessions, route protection
  48. - API Routes (MEDIUM) — External endpoint patterns
  49. - SSR (MEDIUM) — Hydration safety, streaming, selective SSR
  50. - Error Handling (MEDIUM) — Server errors, redirects, not-found
  51. - Environment (MEDIUM) — Configuration management
  52. - File Organization (LOW) — Code separation patterns
  53. - Deployment (LOW) — Environment config
  54. ### [tanstack-integration](./skills/tanstack-integration/)
  55. Best practices for integrating TanStack Query with TanStack Router and TanStack Start together.
  56. **Use when:**
  57. - Combining Query + Router in the same app
  58. - Setting up SSR with data prefetching
  59. - Wiring loaders to query cache
  60. **13 rules across 4 categories:**
  61. - Setup (CRITICAL) — QueryClient context, provider wrapping
  62. - Data Flow (HIGH) — Loader + Query patterns
  63. - Caching (MEDIUM) — Single source of truth
  64. - SSR (LOW) — Dehydration/hydration
  65. ## Installation
  66. ```bash
  67. npx skills add DeckardGer/tanstack-agent-skills
  68. ```
  69. Or manually add to your project's `.cursor/` or Claude Code configuration.
  70. ## Usage
  71. Skills are automatically available once installed. The agent will use them when relevant tasks are detected.
  72. ## Skill Structure
  73. Each skill follows the [Agent Skills](https://agentskills.io/) standard:
  74. ```
  75. skills/
  76. ├── tanstack-query/
  77. │ ├── SKILL.md # Main skill instructions
  78. │ └── rules/ # Individual rule files
  79. │ ├── qk-array-structure.md
  80. │ ├── cache-stale-time.md
  81. │ └── ...
  82. ├── tanstack-router/
  83. │ ├── SKILL.md
  84. │ └── rules/
  85. ├── tanstack-start/
  86. │ ├── SKILL.md
  87. │ └── rules/
  88. └── tanstack-integration/
  89. ├── SKILL.md
  90. └── rules/
  91. ```
  92. ## Rule File Structure
  93. Each rule file contains:
  94. 1. **Priority** — CRITICAL, HIGH, MEDIUM, or LOW
  95. 2. **Explanation** — Why this pattern matters
  96. 3. **Bad Example** — Anti-pattern to avoid with explanation
  97. 4. **Good Example** — Recommended implementation
  98. 5. **Context** — When to apply or skip the rule
  99. ## Contributing
  100. Contributions welcome! Please ensure:
  101. - Rules are practical and battle-tested
  102. - Examples are clear and runnable
  103. - Priority levels are appropriate
  104. - Context helps agents decide applicability
  105. ## Agent Compatibility
  106. Works with any AI coding agent that supports `AGENTS.md`, including Claude Code, Codex, Opencode, and others.
  107. ## Resources
  108. - [TanStack Query Docs](https://tanstack.com/query)
  109. - [TanStack Router Docs](https://tanstack.com/router)
  110. - [TanStack Start Docs](https://tanstack.com/start)
  111. - [Agent Skills Format](https://agentskills.io/)
  112. ## License
  113. MIT — see [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.