TA

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.zip

Installs 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.
157 chars✓ has a “when” trigger
Beginner

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

You give it
Route path and type
You get back
TanStack route file structure

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

TypeLocationUse When
Publicsrc/routes/{path}.tsxNo auth needed
Protectedsrc/routes/_authed/{path}.tsxRequires login

2. File Naming Rules

URLFile Path
/src/routes/index.tsx
/aboutsrc/routes/about.tsx
/productssrc/routes/products/index.tsx
/products/:idsrc/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 useEffect for data fetching (use Convex useQuery)
  • DO NOT forget loading states for async data
  • DO NOT skip SEO meta tags
  • DO run npm run generate:routes if types are stale

Examples

See examples/ directory for:

  • public-route.tsx - Public page with SEO
  • protected-route.tsx - Auth-required page with data

When not to use it

  • Non-web routing tasks

Prerequisites

Convex

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.

SkillInstallsUpdatedSafetyDifficulty
tanstack-route (this skill)06moNo flagsBeginner
nextjs-developer3282moNo flagsAdvanced
landing-page-guide-v2488moReviewIntermediate
frontend-developer274moNo flagsIntermediate

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.

328531

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.

48105

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.

2782

nextjs-best-practices

davila7

Next.js App Router principles. Server Components, data fetching, routing patterns.

3164

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.

1174

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).

679

Search skills

Search the agent skills registry