Skip to content
Back to skills

Tanstack

ASecurity

Implement React data, routes, or forms with TanStack. Covers Query, Router, and Form; excludes Start, DB, and unrelated state or routing libraries.

  • 2,785 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 5, 2026
developmentreactapiperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add compozy/compozy --skill tanstack --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tanstack?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tanstack
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/compozy-tanstack/badge)](https://www.skillsdirectory.com/skills/compozy-tanstack)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tanstack
description: "Implement React data, routes, or forms with TanStack. Covers Query, Router, and Form; excludes Start, DB, and unrelated state or routing libraries."
---

# TanStack

Read the reference matched by the API or behavior being changed. Load adjacent references only for concerns the change crosses; reuse relevant context already read.

## Branches

| When you are… | Reference |
| --- | --- |
| Defining or changing query keys / factories | `references/query-keys.md` |
| Setting staleTime, gcTime, invalidation, placeholder/initial data | `references/query-caching.md` |
| Writing mutations, optimistic updates, or mutation state | `references/query-mutations.md` |
| Prefetching, parallel queries, infinite queries, or cancellation | `references/query-fetch-patterns.md` |
| SSR dehydrate/hydrate, offline networkMode, or query persistence | `references/query-ssr-offline.md` |
| Query error boundaries or select/performance | `references/query-errors-performance.md` |
| Registering the router, `from` typing, virtual routes, or router defaults | `references/router-type-and-org.md` |
| Route loaders, ensureQueryData, or parallel route loading | `references/router-data-loading.md` |
| Search params, Link/navigate, route masks, or preload | `references/router-search-nav.md` |
| Lazy routes, not-found, route context, or auth beforeLoad | `references/router-split-errors-context.md` |
| TanStack Form hooks, Zod validators, or field components | `references/form.md` |

Apply the technical rules relevant to the changed behavior.

## Tripwires

**Query** — array keys that include every dependency; reconcile mutations through canonical keys: update from authoritative responses or invalidate when the owning read model requires a server reread; optimistic cache writes need rollback; never put non-serializable values in keys.

**Router** — register the router type; validate search with defaults (`.catch()`); use `ensureQueryData` in loaders when pairing with Query; `throw redirect(...)` not `return`.

**Form** — complete `defaultValues` for inference; Zod at form/field level; debounce async validators to fit endpoint cost and interaction needs; `role="alert"` on field errors; `preventDefault` on submit.

Files in this skill

  • SKILL.md7.8 KB
  • references/form-patterns.md15 KB
  • references/query-patterns.md8.6 KB
  • references/router-patterns.md9.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.