virtual-file-routes

Define and manage TanStack Router route trees with virtual and physical routes.

4|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/lespaceman/athena-workflow-marketplace --skill virtual-file-routes-lespaceman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: virtual-file-routes
Source: https://github.com/lespaceman/athena-workflow-marketplace/tree/main/plugins/tanstack-start/skills/upstream/%40tanstack/virtual-file-routes/skills/virtual-file-routes
Command: npx skills add https://github.com/lespaceman/athena-workflow-marketplace --skill virtual-file-routes-lespaceman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Programmatic route construction replaces filesystem-based conventions, giving explicit control over TanStack Router trees and allowing mixed virtual and physical routes.

Core Features & Use Cases

  • Route helpers: rootRoute, index, route, layout, physical enable code-first routing.
  • Subtree config: defineVirtualSubtreeConfig for modular route sections.
  • Plugin integration: seamless integration with the TanStack Router plugin to assemble a full routing config.

Quick Start

Create a routes.ts using rootRoute and route to declare your app's routing structure.

Frequently Asked Questions about virtual-file-routes

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

FAQPage Schema
How do I programmatically build a TanStack Router route tree without file-based routing?

Programmatically build a TanStack Router route tree by using code-first helpers like rootRoute, index, route, and layout to explicitly define your route structure instead of relying on filesystem conventions.

Can I mix virtual and physical routes in TanStack Router?

Yes, you can mix virtual and physical routes in TanStack Router by using the physical route helper alongside virtual route definitions, allowing explicit control over route trees that integrate both programmatic and file-based structures.

What is the best way to manage modular route subtree configurations in a code-first app?

The best way to manage modular route subtree configurations is using the defineVirtualSubtreeConfig helper, which allows you to compose modular route sections programmatically before integrating them into the main routing config.

Does virtual file routing integrate with the TanStack Router plugin?

Virtual file routing integrates seamlessly with the TanStack Router plugin to assemble a full routing config, allowing your programmatically defined route tree to be processed by the plugin's build pipeline.

When should I use programmatic routing instead of file-based conventions in TanStack Router?

Use programmatic routing instead of file-based conventions when you need explicit control over your TanStack Router route tree, or when your code-first app requires mixing virtual and physical routes with modular subtree configurations.