This handles TanStack Router's file-based, type-safe routing for React SPAs with full TypeScript support. You get autocomplete on route paths, typed params in links, and route-level data loading that integrates cleanly with TanStack Query. The skill covers Vite plugin setup (order matters: TanStackRouterVite must come before react), common errors like devtools dependency issues, and Cloudflare Workers deployment patterns. If you're tired of stringly-typed navigation or want Next.js-style file routing without Next.js, this is the move. Tested with v1.134.13 and includes templates for loaders, nested routes, and Query integration.

skills.sh installs
461
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill tanstack-router --agent claude-code

Installs into .claude/skills of the current project.

Files

TanStack Router Skill

Build type-safe, file-based routing for React SPAs with TanStack Router, optimized for Cloudflare Workers deployment.


When to Use This Skill

Auto-triggers when you mention:

  • "TanStack Router" or "type-safe routing"
  • "file-based routing" or "route configuration"
  • "React routing" with TypeScript emphasis
  • "route loaders" or "data loading in routes"
  • "Cloudflare Workers routing"

Use this skill when:

  • Building SPAs with type-safe navigation
  • Implementing file-based routing (like Next.js)
  • Need route-level data loading
  • Integrating routing with TanStack Query
  • Deploying to Cloudflare Workers
  • Want better TypeScript support than React Router

Quick Start

Installation

bun add @tanstack/react-router @tanstack/router-devtools
bun add -d @tanstack/router-plugin

Latest version: v1.170.18 (verified 2026-08-03)

Vite Configuration

// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { TanStackRouterVite } from '@tanstack/router-plugin/vite'

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Frontend Development, Cloud & Infrastructure
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1next-safe-action avatarsafe-action-tanstack-querynext-safe-action/skillsUse when integrating next-safe-action with TanStack Query (React Query) -- mutationOptions(), useMutation, ActionMutationError error handling, type guards, opti453skills.sh installs
2ncklrs avatarremotion-animationncklrs/startup-os-skillsGenerates animation configurations for Remotion including spring configs, interpolations, easing functions, and timing logic. Focuses ONLY on animation paramete452skills.sh installs
3aaronontheweb avatarverify-email-snapshotsaaronontheweb/dotnet-skillsSnapshot test email templates using Verify to catch regressions. Validates rendered HTML output matches approved baseline. Works with MJML templates and any ema436skills.sh installs
4secondsky avatarbun-sveltekitsecondsky/claude-skillsUse when building or running SvelteKit apps on Bun, including SSR, adapters, and Bun-specific APIs436skills.sh installs
5auth0 avatarauth0-spa-jsauth0/agent-skillsUse when adding Auth0 login or token management to a Vanilla JS, Svelte, or framework-agnostic SPA. Integrates @auth0/auth0-spa-js — use when there is no framew434skills.sh installs
6dalestudy avatartypescriptdalestudy/skillsTypeScript 타입 정의 및 베스트 프랙티스 스킬. 다음 상황에서 사용: (1) TypeScript 파일(.ts, .tsx) 작성 또는 수정 시, (2) 타입 정의(interface, type) 작업 시, (3) tsconfig.json 설정 또는 컴파일러 옵션 조정 시, (4) 431skills.sh installs