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
1openai 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 "im7.1Kskills.sh installs
2anthropics 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-7.1Kskills.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
4pixijs avatarpixijs-mathpixijs/pixijs-skillsUse this skill when working with coordinates, vectors, matrices, shapes, hit testing, or layout rectangles in PixiJS v8. Covers Point/ObservablePoint, Matrix (27.1Kskills.sh installs
5starchild-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
6wshobson avatarblock-no-verify-hookwshobson/agentsConfigure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags. Use when setting up Claude Code pro7Kskills.sh installs