plugins/tanstack-start-expert/skills/start-core/SKILL.md
TanStack Start setup and project anatomy — tanstackStart() Vite (and Rsbuild) plugin, getRouter() factory, root route document shell (HeadContent, Outlet, Scripts), routeTree.gen.ts, tsconfig, src/ layout. Use when: scaffolding a Start project from scratch, wiring the build tool, understanding where files go, debugging setup (blank page, hydration, no client JS). Do NOT use for: server-only vs isomorphic boundaries (use start-execution-model), SOLID/code organization (use solid-tanstack-start), plain React SPA without Start.
npx skillsauth add fusengine/agents start-coreInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
TanStack Start is a full-stack React framework built on TanStack Router + Vite
(Rsbuild also supported). It adds SSR, streaming, server functions (type-safe
RPCs), middleware, and universal deployment. This skill targets
@tanstack/react-start v1.166.2.
CRITICAL — Start is NOT Next.js. No
getServerSideProps, no"use server"directives, noapp/layout.tsx. Routes live insrc/routes/; server-only code usescreateServerFn.CRITICAL — code is isomorphic by default. Loaders run on server AND client. See the
start-execution-modelskill before putting logic in a loader.CRITICAL — types are fully inferred. Never cast or annotate inferred values.
Before implementing, verify current APIs against Context7
(/websites/tanstack_start_framework_react) + Exa, then explore the target
codebase. After changes, run fuse-ai-pilot:sniper.
Every Start app needs exactly two hand-written wiring files plus one generated:
src/router.tsx — a getRouter() factory returning createRouter({ routeTree }).src/routes/__root.tsx — the document shell (<html>, HeadContent,
Outlet, Scripts).src/routeTree.gen.ts — GENERATED by the plugin. Never edit.// vite.config.ts — Start plugin MUST come before React's
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
export default defineConfig({
server: { port: 3000 },
plugins: [tanstackStart(), viteReact()],
})
// src/router.tsx
import { createRouter } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'
export function getRouter() {
return createRouter({ routeTree, scrollRestoration: true })
}
Full walkthrough → references/project-setup.md. Full file tree and each file's
role → references/project-anatomy.md. Complete copy-paste project →
references/templates/minimal-project.md.
| Topic | Reference | Load when |
|-------|-----------|-----------|
| Install, Vite + Rsbuild config, package.json, tsconfig | references/project-setup.md | scaffolding, wiring the build tool |
| src/ layout, getRouter, __root.tsx, generated tree | references/project-anatomy.md | understanding where files go |
| Plugin order, missing <Scripts />, verbatimModuleSyntax | references/common-mistakes.md | blank page, hydration fails, no client JS |
| Full minimal project (every file) | references/templates/minimal-project.md | starting a new app |
Instead of building by hand, the CLI scaffolds a working project:
npx @tanstack/cli@latest create
# or clone an official example:
npx gitpick TanStack/router/tree/main/examples/react/start-basic start-basic
tanstackStart() (breaks generation).src/routeTree.gen.ts (generated).<Scripts /> in __root.tsx (no hydration).verbatimModuleSyntax (leaks server code into client bundle).getServerSideProps, "use server").testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.