tanstack-route
Scaffolds file-based routes for TanStack Start, ensuring proper SEO configuration, data fetching, and auth protection.
Install
mkdir -p .claude/skills/tanstack-route && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9798" && unzip -o skill.zip -d .claude/skills/tanstack-route && rm skill.zipInstalls to .claude/skills/tanstack-route
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create TanStack Start file-based routes with proper SEO, data loading, and authentication. Use this skill when adding new pages or routes to the application.Key capabilities
- →Generate file-based routes for TanStack Start
- →Configure SEO meta tags for pages
- →Integrate data loading with Convex
- →Set up protected route structures
- →Access dynamic route parameters
How it works
It automates the creation of file-based routing components, ensuring correct file placement, SEO configuration, and data-loading integration.
Inputs & outputs
When to use tanstack-route
- →Adding new pages
- →Setting up protected routes
- →Configuring route SEO
About this skill
Create TanStack Route
Create a new file-based route for TanStack Start with proper structure.
Goal
Generate a properly configured route with:
- Correct file location matching URL path
- SEO meta tags
- Data loading (if needed)
- Authentication (for protected routes)
Instructions
1. Determine Route Type
| Type | Location | Use When |
|---|---|---|
| Public | src/routes/{path}.tsx | No auth needed |
| Protected | src/routes/_authed/{path}.tsx | Requires login |
2. File Naming Rules
| URL | File Path |
|---|---|
/ | src/routes/index.tsx |
/about | src/routes/about.tsx |
/products | src/routes/products/index.tsx |
/products/:id | src/routes/products/$id.tsx |
/dashboard (auth) | src/routes/_authed/dashboard.tsx |
3. Route Structure
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/path")({
component: PageComponent,
head: () => ({
meta: [
{ title: "Page Title | App Name" },
{ name: "description", content: "Page description" },
],
}),
});
function PageComponent() {
return <div>Content</div>;
}
4. Data Loading with Convex
Use useQuery for reactive data:
import { useQuery } from "convex/react";
import { api } from "@convex/_generated/api";
function PageComponent() {
const data = useQuery(api.resource.list);
if (!data) return <Loading />;
return <div>{/* render data */}</div>;
}
5. Dynamic Parameters
Access route params via Route.useParams():
function ProductPage() {
const { productId } = Route.useParams()
const product = useQuery(api.products.get, { id: productId })
// ...
}
Constraints
- DO NOT use
useEffectfor data fetching (use ConvexuseQuery) - DO NOT forget loading states for async data
- DO NOT skip SEO meta tags
- DO run
npm run generate:routesif types are stale
Examples
See examples/ directory for:
public-route.tsx- Public page with SEOprotected-route.tsx- Auth-required page with data
When not to use it
- →Non-web routing tasks
Prerequisites
Limitations
- →Requires manual generation command for types
- →Does not handle complex auth logic
How it compares
It enforces a specific file-naming convention and structure for public versus protected routes to maintain application consistency.
Compared to similar skills
tanstack-route side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| tanstack-route (this skill) | 0 | 6mo | No flags | Beginner |
| nextjs-developer | 328 | 2mo | No flags | Advanced |
| landing-page-guide-v2 | 48 | 8mo | Review | Intermediate |
| frontend-developer | 27 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
nextjs-developer
zenobi-us
Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.
landing-page-guide-v2
bear2u
Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.
frontend-developer
sickn33
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.
nextjs-best-practices
davila7
Next.js App Router principles. Server Components, data fetching, routing patterns.
frontend-code-review
langgenius
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.
frontend-prompt-generator
gharam1234
Generate structured prompts for frontend development tasks following established patterns. Use when the user requests prompts for wireframes, UI implementation, data binding, or routing functionality in React/Next.js projects with specific formatting requirements (Cursor rules, file paths, test-driven development).