router-core

Build type-safe routing infrastructure for React and Solid applications.

7|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/hashintel/brunch --skill router-core-hashintel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: router-core
Source: https://github.com/hashintel/brunch/tree/main/.agents/skills/router-core
Command: npx skills add https://github.com/hashintel/brunch --skill router-core-hashintel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides core concepts and utilities for creating robust, type-safe client-side routers across frameworks.

Core Features & Use Cases

  • Route Tree Construction: Define structured route hierarchies for React and Solid.
  • Route Matching & Sorting: Enable efficient route resolution based on URL matching.
  • Navigation and Linking: Facilitate programmatic navigation and link creation.
  • Type Safety & Inference: Guarantee compile-time safety for route data and parameters.
  • Use Case: Developers can create a seamless, type-inferred routing setup for complex single-page applications.

Quick Start

Create route configuration using createRootRoute and createFileRoute functions, then integrate with your app's router provider.

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 for a React SPA?

Type-safe routing for a React SPA is set up by defining structured route hierarchies using createRootRoute and createFileRoute, then integrating the configuration with your app's router provider to ensure compile-time safety for route data and parameters.

Can I use the same type-safe router core for Solid applications?

Yes, the same type-safe router core supports Solid applications. It provides a framework-agnostic infrastructure for route matching, navigation, and type inference, ensuring reliable client-side navigation compatibility across both React and Solid.

What is route tree construction and how does it handle URL matching?

Route tree construction defines structured route hierarchies that enable efficient route resolution through matching and sorting algorithms based on URL patterns. This mechanism ensures accurate, type-inferred navigation for complex single-page applications.

How do I facilitate programmatic navigation and link creation in an SPA?

Programmatic navigation and link creation are facilitated through the router core's built-in navigation utilities. These tools allow developers to trigger route changes and generate links dynamically while maintaining full type safety across the route tree.

Does this routing approach require any external dependencies?

No, this framework-agnostic routing approach requires no external dependencies. It provides the core concepts and utilities for type-safe client-side routing internally, allowing seamless integration into your React or Solid environment without additional packages.

What's the best way to guarantee compile-time safety for route parameters?

The best way to guarantee compile-time safety for route parameters is by defining route configurations using createRootRoute and createFileRoute, which leverage type inference to validate route data and parameters during development.