tanstack-suite
2
总安装量
2
周安装量
#70941
全站排名
安装命令
npx skills add https://github.com/andymarigoldlabs/continuous-funding --skill tanstack-suite
Agent 安装分布
amp
2
gemini-cli
2
github-copilot
2
codex
2
kimi-cli
2
opencode
2
Skill 文档
TanStack Suite Skill
Use this skill when youâre building or maintaining apps with the TanStack ecosystem, especially when you need:
- Correct package selection (core vs adapter vs devtools)
- Version alignment across related packages
- Correct SSR/data-loading and hydration behavior
- Performance best practices (tables, lists, routers)
- Devtools setup and debugging workflows
This skill covers:
- TanStack Start (full-stack React meta-framework)
- TanStack Router (type-safe routing)
- TanStack Query (async server-state)
- TanStack Table (headless tables/datagrids)
- TanStack DB (reactive client DB + sync)
- TanStack Store (signals-like reactive store)
- TanStack Virtual (virtualized lists/grids)
- TanStack Pacer (debounce/throttle/rate-limit/queue/batch utilities)
- TanStack Form (type-safe form state + validation)
- TanStack AI (type-safe AI SDK + tool calling + streaming)
- TanStack Devtools (unified devtools panel + plugins)
How to use this skill
1) Identify the project archetype
Pick the closest archetype before writing code:
- TanStack Start app (recommended when you control the full stack)
- React + Vite app (add Router/Query/etc manually)
- Monorepo (workspace version alignment is critical)
2) Run the audit scripts early
From the project root, run:
node path/to/skill/scripts/tanstack-audit.mjs
node path/to/skill/scripts/tanstack-usage-report.mjs
node path/to/skill/scripts/tanstack-router-plugin-check.mjs
node path/to/skill/scripts/tanstack-devtools-snippet.mjs
These scripts are read-only and help you quickly detect:
- Which TanStack packages are installed
- Common version-mismatch footguns
- Whether Router file-based generation is configured
- A ready-to-paste Devtools setup snippet based on installed plugins
3) Load the smallest relevant reference doc
This skill includes package-specific reference docs under references/. Load only what you need:
references/tanstack-start.mdreferences/tanstack-router.mdreferences/tanstack-query.mdreferences/tanstack-table.mdreferences/tanstack-db.mdreferences/tanstack-store.mdreferences/tanstack-virtual.mdreferences/tanstack-pacer.mdreferences/tanstack-form.mdreferences/tanstack-ai.mdreferences/tanstack-devtools.mdreferences/versioning-and-packages.md
Operating principles
Prefer official adapters + idiomatic patterns
- Prefer framework adapters (e.g.
@tanstack/react-query,@tanstack/react-router,@tanstack/react-table) over lower-level core packages unless youâre authoring an adapter. - Use file-based routing and generated route trees where supported; avoid hand-maintaining giant route configs.
Keep versions aligned
Some TanStack package families are designed to move together.
- Router + Start: in many setups,
@tanstack/react-router,@tanstack/router-plugin,@tanstack/react-router-devtools, and@tanstack/react-startshould be kept on the same version line. - Query + devtools: keep major versions aligned (e.g. Query v5 with
@tanstack/react-query-devtools).
Use scripts/tanstack-audit.mjs to detect mismatches.
SSR and data correctness first
- If using TanStack Start, treat server-only code as server-only (keys, secrets, DB credentials).
- For Query, ensure prefetch + dehydrate/hydrate is correct, and avoid double-fetching.
- For Router, prefer loader/action patterns for route-coupled data.
Performance defaults
- Tables and virtual lists can become performance traps.
- Enforce stable references (memoize columns/data), use virtualization where appropriate, and avoid unnecessary rerenders.
Devtools are part of the feature set
- Prefer the TanStack Devtools unified panel when possible.
- Otherwise use dedicated devtools (e.g. Query devtools component) and ensure dev-only loading.
Common integration recipes
Start + Router + Query baseline
- Use Routerâs route loaders for route-coupled data needs.
- Use Query for cached async state and background refetching.
- In Start, consider preloading/prefetching queries in loaders and then dehydrating for the client.
Store + Router context
- Use
@tanstack/react-storefor small, app-wide reactive state (auth state, UI preferences, feature flags). - Prefer Router route context for values that are truly navigation-scoped.
DB + Query
- Use DB for local-first reads/writes and live queries.
- Sync to server via the collectionâs mutation hooks/handlers.
- Consider DB-backed collections that plug into Query for cache coherence.
Table + Query + Virtual
- Use Query to fetch server-side paginated/sorted data.
- Use Table for column/sorting/filtering state.
- Use Virtual for rendering only visible rows (especially > 200 rows).
Pacer + Query for debounced/throttled fetching
- Use Pacer when you need stable, testable debouncing/throttling primitives.
- Typical examples: typeahead search, scroll/resize handlers, rate-limited mutation bursts.
Form + Query
- Use Form for local form state.
- Use Query mutations for server writes (or Start server functions).
- Keep server validation canonical; client validation is UX.
Form + Start/Router
- Prefer Start server functions or Router actions.
- Keep secrets on the server.
- Return structured errors that map cleanly to field errors.
AI + Start
- Keep provider keys on the server.
- Stream responses (SSE) to clients.
- Use tool definitions with schema validation.
Devtools (unified)
- Use
@tanstack/react-devtools+ plugin packages when available. - Keep devtools dev-only unless you explicitly need production debugging.
What âdoneâ looks like
When implementing TanStack features, consider the work complete only when:
- â Dependencies are correct and versions are aligned
- â
TypeScript types are clean (no
anyescapes unless justified) - â SSR/hydration path is correct (no double fetch, no hydration warnings)
- â Devtools integration exists (dev-only) for the relevant libs
- â Performance hazards are addressed (virtualization where needed)
- â There is a small, realistic example route/component proving the feature
Troubleshooting checklist
When something is broken, check in this order:
- Versions: run
scripts/tanstack-audit.mjsand fix mismatches. - Devtools: if available, use them to inspect Router/Query/Form/Pacer/AI state.
- SSR/hydration: confirm server and client render match; verify Query hydration and Router loaders.
- Duped packages: ensure there is only one installed copy of key packages (common in monorepos).
- Bundler config: ensure Router plugin/devtools integrations are in the correct place (e.g. Vite plugins order).
What this skill does not do
- It does not replace TanStack documentation.
- It does not assume your exact framework unless you tell it (Start vs plain React).
- It does not run network operations by default.
Quick index
- Start:
references/tanstack-start.md - Router:
references/tanstack-router.md - Query:
references/tanstack-query.md - Table:
references/tanstack-table.md - DB:
references/tanstack-db.md - Store:
references/tanstack-store.md - Virtual:
references/tanstack-virtual.md - Pacer:
references/tanstack-pacer.md - Form:
references/tanstack-form.md - AI:
references/tanstack-ai.md - Devtools:
references/tanstack-devtools.md - Versioning/package map:
references/versioning-and-packages.md