Agent skill

Tanstack Start

by Mindrally in Mindrally/skills

Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro.

Apache-2.0Auto-check passedBackend & APIs

Install Tanstack Start

skills CLI
$ npx skills add Mindrally/skills --skill tanstack-start -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mindrally/skills tanstack-start --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mindrally/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tanstack-start .claude/skills/tanstack-start && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tanstack-start
GitHub stars
267
Token cost
~2k tokens
SKILL.md length
590 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
Apache-2.0

At a glance

Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro.

  • Works in 7 steps: Configure the app — Set up app.config.ts… → Define the root route — Create… → Write server functions — Use… → …
  • Building server functions with createServerFn
  • SKILL.md covers Workflow for Building a…, Core Principles, Configuration and Server Functions, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tanstack Start is an agent skill from Mindrally/skills. Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro. Use when building server functions with createServerFn, setting up SSR and streaming with defer()/Await, writing API routes, configuring app.config.ts, or deploying a TanStack Start app to Node, Vercel, Netlify, Bun, or Cloudflare.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. It works with TanStack, Vite, React and Cloudflare. The repository describes itself as: 255+ Claude Code skills converted from Cursor rules. Expert coding guidelines for every major framework and language. The licence is Apache-2.0.

When your agent uses it

  • Building server functions with createServerFn
  • Setting up SSR and streaming with defer()/Await
  • Writing API routes
  • Configuring app.config.ts

Example prompts

  • “/tanstack-start”

Requirements

  • Node.js

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Configure the app — Set up app.config.ts with the Vite plugins and a server.preset matching the deployment target.
  2. Define the root route — Create src/routes/__root.tsx with the HTML document shell (, , , , , ).
  3. Write server functions — Use createServerFn() with a .validator() and .handler() for any logic that must run on the server (database…
  4. Wire server functions into routes — Call server functions from route loaders for reads and from mutation hooks (useMutation) for writes.
  5. Add API routes for raw HTTP — Use createAPIFileRoute for webhooks, OAuth callbacks, or endpoints that external services call directly.
  6. Stream non-critical data — Wrap slow, non-blocking loader data in defer() and render it with + .
  7. Deploy — Pick the server.preset for the target platform and verify environment variable access rules before shipping.

What it can do on your machine

Read from SKILL.md and the folder at commit 9718410. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tanstack Start loads about 2k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 590 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mindrally/skills at commit 9718410, republished under its Apache-2.0 licence (© Mindrally). 590 words, ~2,041 tokens.

Download SKILL.mdSave it as .claude/skills/tanstack-start/SKILL.md (or your agent's skills folder).
name
tanstack-start
description
Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro. Use when building server functions with createServerFn, setting up SSR and streaming with defer()/Await, writing API routes, configuring app.config.ts, or deploying a TanStack Start app to Node, Vercel, Netlify, Bun, or Cloudflare.

TanStack Start

TanStack Start is a full-stack React framework that layers server functions, SSR, streaming, and API routes on top of TanStack Router and a Vite/Nitro build pipeline, giving end-to-end type safety from server to client.

Workflow for Building a TanStack Start Feature

  1. Configure the app — Set up app.config.ts with the Vite plugins and a server.preset matching the deployment target.
  2. Define the root route — Create src/routes/__root.tsx with the HTML document shell (<html>, <head>, <body>, <Outlet>, <ScrollRestoration>, <Scripts>).
  3. Write server functions — Use createServerFn() with a .validator() and .handler() for any logic that must run on the server (database access, secrets, file I/O).
  4. Wire server functions into routes — Call server functions from route loaders for reads and from mutation hooks (useMutation) for writes.
  5. Add API routes for raw HTTP — Use createAPIFileRoute for webhooks, OAuth callbacks, or endpoints that external services call directly.
  6. Stream non-critical data — Wrap slow, non-blocking loader data in defer() and render it with <Suspense> + <Await>.
  7. Deploy — Pick the server.preset for the target platform and verify environment variable access rules before shipping.

Core Principles

  • TanStack Start = TanStack Router + Vite + Nitro, giving full-stack React with a single type-safe codebase.
  • createServerFn is the primary mechanism for server-side logic — prefer it over hand-rolled REST endpoints for internal data access.
  • All TanStack Router conventions apply on top of Start: file-based routing, loaders, search param validation, and router context.
  • Streaming and Suspense are first-class citizens; use defer() for anything that shouldn't block the initial response.
  • Keep server-only code (secrets, DB clients, filesystem access) strictly inside server functions or API routes — never import it into client components.

Configuration

app.config.ts
ts
import { defineConfig } from '@tanstack/start/config'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  vite: { plugins: [tsConfigPaths()] },
  server: {
    preset: 'node-server', // or: 'vercel', 'netlify', 'bun', 'cloudflare-pages'
  },
})
Root Route HTML Shell
tsx
// src/routes/__root.tsx
import { createRootRoute, Outlet, ScrollRestoration } from '@tanstack/react-router'
import { Scripts } from '@tanstack/start'

export const Route = createRootRoute({
  component: () => (
    <html lang="en">
      <head />
      <body>
        <Outlet />
        <ScrollRestoration />
        <Scripts />
      </body>
    </html>
  ),
})

Server Functions

  • Define server functions in a dedicated src/server/functions/ (or colocated *.server.ts) module for discoverability.
  • Always validate input with .validator() (Zod is the common choice) before the handler runs — never trust client-supplied data.
  • Throw descriptive Errors (or a typed error) from handlers; TanStack Start serializes thrown errors back to the client.
  • Server functions can be called directly from loaders, actions, event handlers, or useMutation — they behave like normal async functions on the client but execute on the server.
ts
// src/server/functions/posts.ts
import { createServerFn } from '@tanstack/start'
import { z } from 'zod'
import { db } from '~/server/db'

export const getPost = createServerFn()
  .validator(z.object({ id: z.string() }))
  .handler(async ({ data }) => {
    const post = await db.post.findUnique({ where: { id: data.id } })
    if (!post) throw new Error('Post not found')
    return post
  })

export const createPost = createServerFn()
  .validator(z.object({ title: z.string().min(1), body: z.string() }))
  .handler(async ({ data }) => db.post.create({ data }))
Show full SKILL.md (238 more words)Show less
Using Server Functions in Routes
tsx
export const Route = createFileRoute('/posts/$postId')({
  loader: ({ params }) => getPost({ data: { id: params.postId } }),
  component: PostDetail,
})

function PostDetail() {
  const post = Route.useLoaderData()
  return <h1>{post.title}</h1>
}
Mutations with Server Functions
tsx
import { useMutation } from '@tanstack/react-query'
import { useQueryClient } from '@tanstack/react-query'
import { createPost } from '~/server/functions/posts'

function NewPostForm() {
  const queryClient = useQueryClient()
  const mutation = useMutation({
    mutationFn: (input: { title: string; body: string }) => createPost({ data: input }),
    onSuccess: () => queryClient.invalidateQueries({ queryKey: ['posts'] }),
  })

  return (
    <form
      onSubmit={(e) => {
        e.preventDefault()
        const form = new FormData(e.currentTarget)
        mutation.mutate({
          title: String(form.get('title')),
          body: String(form.get('body')),
        })
      }}
    >
      <input name="title" placeholder="Title" required />
      <textarea name="body" placeholder="Body" required />
      <button type="submit" disabled={mutation.isPending}>Publish</button>
    </form>
  )
}

API Routes

Use API routes for endpoints that must speak raw HTTP (webhooks, OAuth callbacks, health checks) instead of server functions, which are meant to be called from your own client code.

ts
// src/routes/api/webhook.ts
import { createAPIFileRoute } from '@tanstack/start/api'

export const Route = createAPIFileRoute('/api/webhook')({
  POST: async ({ request }) => {
    const body = await request.json()
    // verify signature, enqueue processing, etc.
    return Response.json({ received: true })
  },
})

Streaming with defer()

  • Await only the data required for the initial paint; wrap everything else in defer() so the shell renders immediately.
  • Pair deferred values with <Suspense> and <Await> so the UI shows a fallback until the promise resolves.
tsx
export const Route = createFileRoute('/posts/$postId')({
  loader: async ({ params }) => {
    const post = await getPost({ data: { id: params.postId } }) // critical, awaited
    const comments = getComments({ data: { postId: params.postId } }) // not awaited
    return { post, comments: defer(comments) }
  },
  component: PostDetail,
})

function PostDetail() {
  const { post, comments } = Route.useLoaderData()
  return (
    <div>
      <h1>{post.title}</h1>
      <Suspense fallback={<CommentsSkeleton />}>
        <Await promise={comments}>{(c) => <CommentsList comments={c} />}</Await>
      </Suspense>
    </div>
  )
}

Environment Variables

  • Access server-only secrets via process.env only inside server functions or API routes.
  • Use import.meta.env.VITE_* for any variable that must be exposed to the client bundle.
  • Never reference process.env directly in a client component — Vite will not inline server secrets, and doing so is a common source of leaked configuration.

Deployment Targets

Configure server.preset in app.config.ts to match the hosting platform:

  • node-server — default, runs anywhere Node.js runs.
  • vercel — Vercel serverless/edge functions.
  • netlify — Netlify Functions.
  • bun — Bun runtime.
  • cloudflare-pages — Cloudflare Pages + Workers (watch for Node API compatibility gaps in server functions).

Common Mistakes

  • Calling a server function's handler logic directly from a client component instead of going through createServerFn — this breaks the client/server boundary and type inference.
  • Awaiting everything in a loader, which defeats the purpose of streaming and slows the initial response.
  • Forgetting .validator(), leaving handlers to trust unvalidated client input.
  • Mixing process.env reads into shared utility modules that are imported by both client and server code.

© Mindrally, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tanstack-start of Mindrally/skills.

Open the folder on GitHubat commit 9718410

Compare with similar skills

Tanstack Start next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tanstack Start compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tanstack Start this skillMindrally/skills267—~2kAutomated safety check: PassApache-2.0
Golivemikehasa/golive-skill1.2k—~13kAutomated safety check: NotesMIT
Nitro Server Toolkitantfu/skills5.9k—~948Automated safety check: PassMIT
Shadmin CLIahaodev/shadmin174—~1.1kAutomated safety check: NotesMIT
Memstack Deployment Netlify Deploycwinvestments/memstack423—~2.6kAutomated safety check: PassProprietary
Olore Tanstack Start Latestolorehq/olore103—~1.1kAutomated safety check: PassMIT

Similar skills

  • Golive

    mikehasa/golive-skill

    Take an agent-written app from repo to live production on the user's OWN accounts, with providers they choose (hosting, database, auth, payments, email, domain/DNS).

    1.2k GitHub stars~13k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes
  • Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.

    5.9k GitHub stars~948 tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Shadmin CLI

    ahaodev/shadmin

    A skill your agent uses when the user asks to query Shadmin admin platform resources (users, roles, menus, registered API resources) from a terminal — for example "list shadmin users", "show shadmin…

    174 GitHub stars~1.1k tokensUpdated 5 days ago
    Backend & APIsAuto-check: notes
  • A skill your agent uses when the user says 'deploy to Netlify', 'Netlify setup', 'netlify-deploy', or needs to deploy a static site or serverless functions to Netlify with build configuration and…

    423 GitHub stars~2.6k tokensUpdated 10 days ago
    DevOps & CloudAuto-check passed
  • Local TanStack Start documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Cleanup Specialist

    ahaodev/shadmin

    Safe cleanup of Shadmin's Go backend, React frontend, Go CLI, and docs — remove dead code, consolidate duplication, and improve maintainability without changing behavior or adding features.

    174 GitHub stars~1.3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from Mindrally/skills

All 34 skills in this repo
  • Analytics Data Analysis

    Mindrally/skills

    Best practices for analytics, data analysis, and visualization using Python, pandas, matplotlib, seaborn, and Jupyter notebooks.

    267 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Best practices for AutoML and hyperparameter search with Optuna, Ray Tune, and PyCaret, covering search-space design, validation splits, and leakage prevention.

    267 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Blender Python Addon

    Mindrally/skills

    Best practices for writing Blender Python add-ons using the bpy API, covering operators, panels, properties, registration, and API-safe scripting.

    267 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Expert guidelines for Chrome extension development with Manifest V3, covering security, performance, and best practices.

    267 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Clean Code

    Mindrally/skills

    Clean, maintainable, human-readable code principles combined with anti-over-engineering discipline: naming, single responsibility, DRY, and scoping changes to exactly what was requested.

    267 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Design Systems

    Mindrally/skills

    Comprehensive design system guidelines for building consistent, accessible, and scalable component libraries.

    267 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Tanstack Start

What does Tanstack Start do?

Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro. Tanstack Start is an agent skill from Mindrally/skills. Best practices for TanStack Start, the full-stack React framework built on TanStack Router and Vite/Nitro.

When should I use Tanstack Start?

Tanstack Start fits situations like: building server functions with createServerFn; setting up SSR and streaming with defer()/Await; writing API routes; configuring app.config.ts.

How do I install Tanstack Start in Claude Code?

Run `npx skills add Mindrally/skills --skill tanstack-start -a claude-code`. Or copy the skill folder (tanstack-start in Mindrally/skills) into .claude/skills/tanstack-start in your project. Claude Code loads it when a task matches its description.

How do I install Tanstack Start in Codex?

Run `npx skills add Mindrally/skills --skill tanstack-start -a codex`. Or copy the skill folder (tanstack-start in Mindrally/skills) into .agents/skills/tanstack-start in your project. Codex loads it when a task matches its description.

Can I use Tanstack Start in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mindrally/skills --skill tanstack-start -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tanstack-start, .gemini/skills/tanstack-start, .github/skills/tanstack-start and .opencode/skills/tanstack-start in your project.

What does Tanstack Start need to run?

SKILL.md names no scripts, command-line tools or credentials: Tanstack Start is instructions for the agent only. Our summary lists: Node.js.

Does Tanstack Start access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tanstack Start safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tanstack Start use?

Tanstack Start is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tanstack Start use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tanstack Start?

Skills that share tags, products or a category with Tanstack Start: Golive (mikehasa/golive-skill, 1.2k stars), Nitro Server Toolkit (antfu/skills, 5.9k stars), Shadmin CLI (ahaodev/shadmin, 174 stars) and Memstack Deployment Netlify Deploy (cwinvestments/memstack, 423 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tanstack Start?

Mindrally (a GitHub organization) maintains it in Mindrally/skills, which has 267 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on September 3, 2026.

Source: Mindrally/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.