deckardger avatar

Tanstack Router Best Practices

This is a comprehensive rule set for TanStack Router covering everything from type safety and file-based routing to search param validation and code splitting. It's organized into 10 categories with 36 specific rules, each with anti-patterns and recommended implementations. Use this when you're setting up routing in a React app and want to avoid common mistakes around type inference, data loading patterns, and navigation. The rule prefixes make it easy to scan (ts- for type safety, load- for data loading, etc). Honestly, this is the kind of reference you'll appreciate three months in when your route tree gets complicated and you need to remember why loaderDeps matter or how to properly handle search param inheritance.

skills.sh installs
7.2K
GitHub stars
230
last updated
Aug 21, 2026

Install

$ npx -y skills add deckardger/tanstack-agent-skills --skill tanstack-router-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

TanStack Router Best Practices

Comprehensive guidelines for implementing TanStack Router patterns in React applications. These rules optimize type safety, data loading, navigation, and code organization.

When to Apply

  • Setting up application routing
  • Creating new routes and layouts
  • Implementing search parameter handling
  • Configuring data loaders
  • Setting up code splitting
  • Integrating with TanStack Query
  • Refactoring navigation patterns

Rule Categories by Priority

Sponsors

Details

Repository
github.com/deckardger/tanstack-agent-skills
Categories
Frontend Development, AI & Agent Building

More from deckardger/tanstack-agent-skills

All 4
1vercel avatarvercel-clivercel/vercelDeploy, manage, inspect, and troubleshoot Vercel projects from the command line. Use for Vercel deployments, build failures, projects and teams, environment var7.2Kskills.sh installs
2affaan-m avatarbackend-patternsaffaan-m/eccBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.7.2Kskills.sh installs
3lijigang avatarljg-cardlijigang/ljg-skillsContent caster (铸). Transforms content into PNG visuals. Seven molds: -l (default) long reading card, -i infograph, -m multi-card reading cards (1080x1440), -v 7.1Kskills.sh installs
4starchild-ai-agent avatarorderly-onboardingstarchild-ai-agent/official-skillsOrderly Network onboarding: omnichain perps infra, MCP server, SDK and CLI quickstart. Also indexes executed Orderly fills into Starchild trade analytics. Use w7.1Kskills.sh installs
5openai avatarfigma-implement-designopenai/skillsTranslates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "im7Kskills.sh installs
6anthropics avatararchitectureanthropics/knowledge-work-pluginsCreate or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-7Kskills.sh installs