virtual-file-routes

Build route trees programmatically for TanStack Router applications.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/redacharf/fin-punk --skill virtual-file-routes-redacharf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: virtual-file-routes
Source: https://github.com/redacharf/fin-punk/tree/main/.agents/skills/virtual-file-routes
Command: npx skills add https://github.com/redacharf/fin-punk --skill virtual-file-routes-redacharf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds route trees programmatically to replace filesystem-based routing conventions, enabling explicit control and seamless mixing of virtual and physical routes.

Core Features & Use Cases

  • Create rootRoute, index, route, layout, and physical route trees in code.
  • Define virtual subtree configurations to compose in-memory routes with file-based routes.
  • Use with the TanStack Router plugin to configure routing for React, Solid, or Vue apps.

Quick Start

Define a simple rootRoute with an index and a couple of child routes, then wire it to your router instance.

Frequently Asked Questions about virtual-file-routes

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

FAQPage Schema
How do I define TanStack Router routes programmatically without using the filesystem?

Defining TanStack Router routes programmatically replaces filesystem-based routing conventions by building explicit route trees in code. This allows you to configure rootRoute, index, route, and layout structures directly, giving you full control over your web routing setup without managing physical files.

Can I mix virtual routes with file-based routes in a React application?

Yes, you can mix virtual and physical routes in React. By defining virtual subtree configurations, you can compose in-memory routes alongside existing file-based routes, allowing seamless integration of programmatic routing structures within a partially file-based web routing architecture.

What is a virtual subtree configuration and when do I need it for web routing?

A virtual subtree configuration is an in-memory route tree structure used to compose programmatic routes with physical file-based routes. You need it when you require explicit control over specific routing segments while retaining filesystem conventions for the rest of your application architecture.

Does TanStack Router support inline route definitions for Solid or Vue apps?

Yes, TanStack Router supports inline route definitions for Solid or Vue apps. You can use the TanStack Router plugin to wire programmatically generated route trees, applying the core API set like rootRoute, index, and layout across different frontend frameworks.

How do I build a strongly typed route tree using TypeScript?

Building a strongly typed route tree in TypeScript uses a programmatic interface to define routes. This approach satisfies the core API set including rootRoute, index, route, layout, physical, and defineVirtualSubtreeConfig, ensuring your web routing configurations are fully type-safe.

What is the best way to replace filesystem routing conventions with code-based route trees?

The best way to replace filesystem routing conventions is building route trees programmatically. This approach enables explicit control over your routing structure, allowing you to define rootRoute, index, route, and layout hierarchies directly in code without relying on filesystem folder structures.