react-tanstack-router
БесплатноБез исполняемых скриптовНе проверенUse when implementing routing in a React app (NOT Next.js) with TanStack Router — file-based routes, loaders, search params.
от Fusengine★ 36 звёзд на GitHubОб этом скилле
Covers the full SOLID module structure (modules/cores/lib/router/, feature modules with interfaces//queries//components/), migration from React Router (useParams()→Route.useParams(), loader→loader option), and error boundaries/404 handling. Does not cover state management (react-state) or forms (react-forms) — those are separate skills; for Next.js routing use the App Router (nextjs-16), not this skill.
TanStack Router
100% type-safe router for React with file-based routing, loaders, search params validation, and deep TanStack Query integration.
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Analyze existing routes and navigation patterns
- fuse-ai-pilot:research-expert - Verify latest TanStack Router docs via Context7/Exa
- mcp__context7__query-docs - Check file-based routing and type-safe patterns
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
Why TanStack Router?
TanStack Router is the recommended choice for React SPAs requiring type-safe routing with search params validation.
| Feature | TanStack Router | React Router v7 |
|---|---|---|
| Type Safety | Full inference | Auto-generated |
| File-based Routing | Built-in | Framework mode |
| Search Params Validation | Zod, Valibot | Manual |
| Preloading | Intent, render | Limited |
| TanStack Query Integration | Native | Manual |
When to Use
- React SPA with Vite, Webpack, or Rspack → See installation.md
- Type-safe routing required → See typescript.md
- Search params validation needed → See search-params.md
- TanStack Query for data fetching → See tanstack-query.md
- NOT Next.js (use App Router instead)
Critical Rules
- ALWAYS use file-based routing - Auto-generated type safety → file-based-routing.md
- ALWAYS validate search params - Pass the Zod v4 schema directly to
validateSearch(zodValidatoronly for Zod v3) → search-params.md - ALWAYS use Route.useLoaderData() - Not global useLoaderData → hooks.md
- ALWAYS register router types -
declare module '@tanstack/react-router'→ typescript.md - PREFER loaders over useEffect - Data fetching before render → loaders.md
- INTEGRATE TanStack Query - For caching, mutations, optimistic updates → tanstack-query.md
- FOLLOW SOLID architecture - Modules, interfaces, file size limits → solid-react skill
Quick Reference: What to Read
Starting a new project
- Read installation.md for configuration
- Copy template basic-setup.md as base
Creating a feature module (posts, users, etc.)
- Follow architecture in templates/feature-module.md
- Use patterns from tanstack-query.md for queries
Implementing authentication
- Read auth-guards.md for concepts
- Copy template auth-protected-routes.md
Creating a page with filters/search
- Read search-params.md for Zod validation
- Copy template search-filters.md
Creating a dashboard with nested layouts
- Read nested-routes.md for concepts
- Copy template dashboard-layout.md
Project Structure (SOLID Architecture)
Recommended structure following SOLID principles from solid-react skill.
src/
├── modules/
│ ├── cores/ # Shared between features
│ │ ├── lib/
│ │ │ ├── router/router.ts # Router configuration
│ │ │ └── query/client.ts # QueryClient configuration
│ │ ├── components/layouts/ # Shared layouts
│ │ └── interfaces/ # Shared types
│ └── [feature]/ # Feature module
│ ├── src/
│ │ ├── interfaces/ # Module types
│ │ ├── queries/ # TanStack Query options
│ │
Установить react-tanstack-router в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-tanstack-router?
Use when implementing routing in a React app (NOT Next.js) with TanStack Router — file-based routes, loaders, search params.
Как установить скилл react-tanstack-router?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-tanstack-router запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub