router-core

Model TanStack Router routes and contexts with a central type inference system.

6|1|Updated Jun 1, 2025
One-click install
npx skills add https://github.com/rezics/rezics --skill router-core-rezics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: router-core
Source: https://github.com/rezics/rezics/tree/main/.agents/skills/tanstack/router/router-core
Command: npx skills add https://github.com/rezics/rezics --skill router-core-rezics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a framework-agnostic, strongly-typed routing core that underpins TanStack Router skills, offering the foundational constructs like route trees, createRouter, createRoute, createRootRoute, createRootRouteWithContext, addChildren, Register type declaration, route matching, route sorting, and file naming conventions. This core serves as the entry point for all router skills and standardizes how routing concerns are expressed.

Core Features & Use Cases

  • Framework-agnostic core concepts (route trees, createRouter, createRoute, createRootRoute, createRootRouteWithContext) that act as the shared foundation for all router skills.
  • Type-safe routing with automatic context propagation and a stable interface for composing sub-skills and real apps.
  • Common patterns for routing concerns (beforeLoad, loader, notFound, error boundaries) that teams reuse across projects.
  • Supports cross-skill composition and scalable route trees for large apps.

Quick Start

Create a root route with createRootRoute and render an Outlet to bootstrap your app.

Frequently Asked Questions about router-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up type-safe routing in a TypeScript application?

Type-safe routing in TypeScript uses a framework-agnostic core with createRouter and createRoute to model route trees, ensuring automatic context propagation and strongly-typed navigation patterns across your application.

How do I create a root route with context in TanStack Router?

Creating a root route with context uses createRootRouteWithContext to establish a base layout, passing shared dependencies downward through the route tree while maintaining full type inference for nested routes.

Can I use this routing core with different frontend frameworks?

Yes, the routing core is framework-agnostic, providing the foundational constructs like route matching and sorting independently of any specific client framework, allowing cross-skill composition and reuse across diverse frontend projects.

What is the best way to handle routing concerns like loaders and error boundaries?

Handling routing concerns like loaders and error boundaries involves using standardized patterns such as beforeLoad and notFound within the route definition, centralizing data fetching and error handling logic directly in the route tree.

How does type inference work across a scalable route tree?

Type inference across a scalable route tree works through a central type system that automatically propagates context and route parameters from parent to child routes, ensuring type safety without manual interface declarations.