tanstack-start-guide

tanstack-start-guide is a cursor rule for Cursor from jahands/prompts. It costs 17 tokens per session (1,182 once invoked), scanned A, original, MIT.

A set of coding rules for TanStack Start, a framework for building React web applications. It recommends where to keep data, form values, URL settings, and server-only operations.

In plain words
What is it for?
Use it while building TanStack Start pages, data fetching, forms, mutations, URL-driven interfaces, and server functions.
Why use it?
It helps prevent application state from being stored in the wrong place and encourages consistent, type-safe patterns.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it while building TanStack Start pages, data fetching, forms, mutations, URL-driven interfaces, and server functions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jahands/prompts/tanstack-start-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jahands/prompts

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tanstack-start-guide

README.md
[![agentmods](https://agentmods.dev/badge/rules/jahands/prompts/tanstack-start-guide/github.svg)](https://agentmods.dev/rules/jahands/prompts/tanstack-start-guide)
Your own site
<a href="https://agentmods.dev/rules/jahands/prompts/tanstack-start-guide"><img src="https://agentmods.dev/badge/rules/jahands/prompts/tanstack-start-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tanstack-start-guide

Your own site · 80×15
<a href="https://agentmods.dev/rules/jahands/prompts/tanstack-start-guide"><img src="https://agentmods.dev/badge/rules/jahands/prompts/tanstack-start-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01182
Opus 5.5 $0.00007 $0.00473
Sonnet 5.5 $0.00003 $0.00236
Haiku 4.5 $0.00002 $0.00118

Measured 19d ago against content hash 4f7bdd3521d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tanstack-start-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor-rules/tanstack-start-guide.mdc · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Is it a mutation (create/update/delete)? → Use server function + useMutation

Is it UI state that should be shareable? → Use search params in the URL

Is it temporary UI state (form inputs, toggles)? → Use useState/useReducer locally

Is it derived from other state? → Calculate it during render (useMemo if expensive)

Does it need to sync with external systems? → Use useEffect (the one case where an effect is the right tool)

// Component just consumes data function ProductList() { const { category } = Route.useParams() const { data } = useSuspenseQuery({ queryKey: ['products', category], }) // No loading state needed - Suspense handles it }

</example>
</data-fetching-patterns>

<state-management-principles>
- Server state is not client state - don't mix them
- URL state > Context > Component state (in order of preference)
- One source of truth per piece of data
- Mutations should be optimistic by default
- Form state can be local until submission
</state-management-principles>

<server-functions>
<rule>
<name>Server functions for all mutations and server-only logic</name>
<why>Type-safe RPC, automatic validation, progressive enhancement</why>
<requirements>
- Always validate inputs with schemas
- Return meaningful responses for optimistic updates
- Handle both FormData (no-JS) and JSON submissions
- Never expose sensitive operations to client bundles
</requirements>
</rule>
</server-functions>

<react-patterns>
- Components are pure functions - no side effects during render
- Effects are escape hatches, not go-to solutions
- Suspense boundaries at route level for best streaming
- Error boundaries colocated with Suspense boundaries
- Prefer composition over prop drilling or context
- CSS handles animations, not JavaScript state machines
</react-patterns>

<performance-guidelines>
- Code splits at route boundaries automatically
- Lazy load below-the-fold components
- Preload likely next navigations
- Stream HTML as soon as possible
- Keep client bundles small for edge deployment
- Use platform capabilities (KV, R2) over custom solutions
</performance-guidelines>

<type-safety-requirements>
- Every route param must be validated
- Search params need schema validation
- Server function inputs/outputs fully typed
- No `any` types in route definitions
- Leverage inference over explicit types
</type-safety-requirements>

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago Changed 4f7bdd3521d5
  2. 1mo ago First seen · 160 lines · 17 tokens per session scan A 6a129ad1faa7

Subscribe to this mod's changes

tanstack-start-guide is a cursor rule published in the GitHub repository jahands/prompts (19 stars, last pushed 12d ago), licensed MIT. It adds 17 tokens to every session and 1,182 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.