Agent skill

Tanstack Start

by asmyshlyaev177 in asmyshlyaev177/test-proxy-recorder

Record and replay TanStack Start SSR with test-proxy-recorder.

MITAuto-check: notesTesting & QA

Install Tanstack Start

skills CLI
$ npx skills add asmyshlyaev177/test-proxy-recorder --skill tanstack-start -a claude-code

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

GitHub CLI
$ gh skill install asmyshlyaev177/test-proxy-recorder 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/asmyshlyaev177/test-proxy-recorder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/test-proxy-recorder/skills/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
112
Token cost
~2.9k tokens
SKILL.md length
855 words
Files
2 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Record and replay TanStack Start SSR with test-proxy-recorder.

  • Tasks that involve React components
  • SKILL.md covers Setup, Core Patterns, Common Mistakes and Getting help
  • Calls node and pnpm; needs COGNITO_TEST_PASSWORD
  • Tasks that involve Backend development

What it does

Tanstack Start is an agent skill from asmyshlyaev177/test-proxy-recorder. Record and replay TanStack Start SSR with test-proxy-recorder. Tag server-side fetches (route loaders, server functions, server routes) with the x-test-rcrd-id session header so parallel replay stays correct. Lead with registerProxyFetch (patch global fetch once at the top of src/router.tsx); createHeadersWithRecordingId and getRecordingId are the patch-free per-call options. Covers the vite build + node .output/server/index.mjs vs vite dev caveat, TESTPROXYRECORDERENABLED, the server BACKENDURL vs browser…

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/auth-and-isr.md`).

It sits in Testing & QA, covering React components, Backend development and End-to-end testing. It works with TanStack, Vite, Playwright and Next.js. The repository describes itself as: Record & replay API responses for Playwright E2E tests — SSR proxy + browser HAR + WebSockets. Deterministic CI, no backend, no manual mocks. The licence is MIT.

When your agent uses it

  • Tasks that involve React components
  • Tasks that involve Backend development
  • Tasks that involve End-to-end testing

Example prompts

  • “/tanstack-start”

What it can do on your machine

Read from SKILL.md and the folder at commit 0a7169e. 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

    Shell commands in SKILL.md call:

    • node
    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • COGNITO_TEST_PASSWORD

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

Context cost

Tanstack Start loads about 2.9k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 219 tokens; SKILL.md has 855 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~219
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.5k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:275
    # apps/.../.env (committed)
  • NoteMentions a .env fileSKILL.md:282
    # apps/.../.env.local (gitignored); Vite still bakes VITE_* in at build time
  • NoteMentions a .env fileSKILL.md:291
    `.env.local` (or CI secrets). Gate the auth Playwright projects on the creds being

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 asmyshlyaev177/test-proxy-recorder at commit 0a7169e, republished under its MIT licence (© asmyshlyaev177). 855 words, ~2,856 tokens.

Download SKILL.mdSave it as .claude/skills/tanstack-start/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
tanstack-start
description
Record and replay TanStack Start SSR with test-proxy-recorder. Tag server-side fetches (route loaders, server functions, server routes) with the x-test-rcrd-id session header so parallel replay stays correct. Lead with registerProxyFetch (patch global fetch once at the top of src/router.tsx); createHeadersWithRecordingId and getRecordingId are the patch-free per-call options. Covers the vite build + node .output/server/index.mjs vs vite dev caveat, TEST_PROXY_RECORDER_ENABLED, the server BACKEND_URL vs browser import.meta.env.VITE_API_URL split, TanStack Query SSR prefetch (ensureQueryData / useSuspenseQuery), and the real-auth pattern (transparent-mode login, Bearer redaction, localStorage-token vs cookie session). Load this when setting up test-proxy-recorder in a TanStack Start (Vite + Nitro) app that makes server-side or authenticated API calls.
requires
test-proxy-recorder/proxy-setup
sources
asmyshlyaev177/test-proxy-recorder:README.md, asmyshlyaev177/test-proxy-recorder:packages/test-proxy-recorder/src/tanstack-start/registerProxyFetch.ts…
metadata.type
framework
metadata.library
test-proxy-recorder
metadata.library_version
1.3.1
metadata.framework
tanstack-start

This skill builds on test-proxy-recorder/proxy-setup. Read it first for the proxy CLI, playwright.config.ts, fixtures, and the record/replay lifecycle before applying TanStack Start patterns.

test-proxy-recorder — TanStack Start SSR

TanStack Start runs loaders and server functions on the server, so their fetch calls go through the proxy without a browser context — the same situation as Next.js SSR. The proxy correlates those requests to the right test session via the x-test-rcrd-id header. Playwright's playwrightProxy.before() already sets it on the browser navigation that triggers SSR, so the id arrives on the incoming server request — the one thing left is to attach it to outgoing server-side requests. Browser-only tests need none of this; the proxy falls back to the globally set session.

All helpers from test-proxy-recorder/tanstack-start are no-ops on the client and no-ops in production unless TEST_PROXY_RECORDER_ENABLED=true is set.

Record against a production build. Use vite build + node .output/server/index.mjs (i.e. pnpm start), not vite dev. The dev server's per-request context differs from the production runtime registerProxyFetch() patches. Because the production server runs in production mode, set TEST_PROXY_RECORDER_ENABLED=true on the app process for the e2e run.

Setup

One line tags every server-side fetch — route loaders, server functions, server routes, and TanStack Query's queryFn during SSR prefetch. Call it at the top of src/router.tsx: that module runs on the server for every SSR request, and the call is idempotent, a no-op on the client, and a no-op in production unless the recorder is enabled.

typescript
// src/router.tsx
import { QueryClient } from '@tanstack/react-query';
import { createRouter } from '@tanstack/react-router';
import { registerProxyFetch } from 'test-proxy-recorder/tanstack-start';

import { routeTree } from './routeTree.gen';

registerProxyFetch(); // no-op on the client / in production unless TEST_PROXY_RECORDER_ENABLED=true

export function getRouter() {
  const queryClient = new QueryClient();
  return createRouter({ routeTree, context: { queryClient } });
}

It patches the global fetch to copy the current request's x-test-rcrd-id onto outgoing requests, reading it from TanStack Start's server request context (getRequestHeader from @tanstack/react-start/server).

Point the app at the proxy

Resolve the API base per environment so both origins are recorded. On the server (loaders / server functions) read process.env.BACKEND_URL; in the browser read the build-time import.meta.env.VITE_API_URL. Both default to the proxy in dev/test; in production they point at the real backend.

typescript
// src/lib/api.ts
function apiBase(): string {
  if (typeof window === 'undefined') {
    return process.env.BACKEND_URL ?? 'http://localhost:8100'; // server only
  }
  return import.meta.env.VITE_API_URL ?? 'http://localhost:8100'; // browser
}

Core Patterns

TanStack Query SSR prefetch — zero Query-specific wiring

registerProxyFetch() tags the fetch that Query's queryFn runs during SSR, so a loader that prefetches with ensureQueryData is recorded as .mock.json and the component reads it with useSuspenseQuery — no recorder code in the data layer.

typescript
// src/routes/index.tsx
export const Route = createFileRoute('/')({
  loader: ({ context }) => context.queryClient.ensureQueryData(todosQueryOptions),
  component: TodoApp, // uses useSuspenseQuery(todosQueryOptions)
});
Per-call — createHeadersWithRecordingId() (patch-free)

For a single fetch inside a loader or server function, or when you'd rather not patch global fetch. It reads the id from the server request context itself, so it is async and takes only your extra headers:

typescript
import { createHeadersWithRecordingId } from 'test-proxy-recorder/tanstack-start';

const res = await fetch('http://localhost:8100/todos', {
  headers: await createHeadersWithRecordingId({ 'Content-Type': 'application/json' }),
});

getRecordingId() (also async) returns the raw id or null if you want to forward it yourself. Both no-op in production unless TEST_PROXY_RECORDER_ENABLED=true.

Authenticated apps (real auth provider)

Log in for real in transparent mode (never recorded); record only the protected API, with the token redacted. A token in localStorage can't be read on the server, so the protected fetch runs in the browser (recorded via HAR) — do not SSR-prefetch it. A cookie session, by contrast, can be forwarded into a loader with createHeadersWithRecordingId() and recorded server-side. Full flow (a runnable AWS Cognito /login → /dashboard, the setup + auth Playwright projects, and cache-header ISR) is in references/auth-and-isr.md.

Common Mistakes

Show full SKILL.md (350 more words)Show less
HIGH Recording against vite dev instead of a production build

Wrong:

json
{ "scripts": { "start": "vite dev --port 3000" } }

Correct:

json
{
  "scripts": {
    "build:test": "TEST_PROXY_RECORDER_ENABLED=true vite build",
    "start": "TEST_PROXY_RECORDER_ENABLED=true node .output/server/index.mjs"
  }
}

registerProxyFetch() patches the global fetch of the production Nitro runtime. vite dev's per-request context differs, so the patch may not tag SSR fetches — recordings land under the wrong session or not at all. Record against vite build + node .output/server/index.mjs.

Source: apps/example-tanstack-start/package.json; e2e/ssr.spec.ts


HIGH Building without TEST_PROXY_RECORDER_ENABLED on a production build

Wrong:

bash
vite build && node .output/server/index.mjs   # NODE_ENV=production → helpers no-op

Correct:

bash
TEST_PROXY_RECORDER_ENABLED=true vite build
TEST_PROXY_RECORDER_ENABLED=true node .output/server/index.mjs

A production build runs in production mode, where registerProxyFetch / createHeadersWithRecordingId are silent no-ops. SSR requests still flow through the proxy but lose their session id, so they record under the wrong session. Set TEST_PROXY_RECORDER_ENABLED=true on both the build and the app process.

Source: packages/test-proxy-recorder/src/recorderEnabled.ts


HIGH SSR-prefetching a resource whose token lives in localStorage

Wrong:

typescript
// The server has no localStorage, so the loader can't send the Bearer token —
// the prefetch hits the protected API unauthenticated and 401s.
export const Route = createFileRoute('/dashboard')({
  loader: ({ context }) => context.queryClient.ensureQueryData(protectedTodosQuery),
});

Correct:

typescript
// Read the token after mount and fetch on the client (recorded via HAR).
const token = getToken(); // localStorage — client only
const { data } = useQuery({ ...protectedTodosQueryOptions(token), enabled: !!token });

A localStorage token is unreadable during SSR. Fetch protected data on the client (HAR-recorded) — or, for a cookie session, forward it into the loader with createHeadersWithRecordingId() and record server-side.

Source: apps/example-tanstack-start/src/routes/dashboard.tsx; e2e/auth.spec.ts


MEDIUM Calling registerProxyFetch() outside src/router.tsx

Wrong:

typescript
// src/routes/index.tsx — a route module doesn't reliably run before the SSR
// fetches of other routes, so the global patch may not be installed in time.
registerProxyFetch();

Correct:

typescript
// src/router.tsx — runs on the server for every SSR request, before route work.
registerProxyFetch();

Put the call at the top of src/router.tsx (the router-setup module). It is the TanStack Start counterpart of the Next.js root-layout call and guarantees the patch is installed for every SSR request.

Source: apps/example-tanstack-start/src/router.tsx


MEDIUM Reading process.env for the API base in the browser

Wrong:

typescript
const API_BASE = process.env.BACKEND_URL ?? 'http://localhost:8100'; // client bundle

Correct:

typescript
const API_BASE =
  typeof window === 'undefined'
    ? process.env.BACKEND_URL ?? 'http://localhost:8100'
    : import.meta.env.VITE_API_URL ?? 'http://localhost:8100';

In the browser bundle process.env isn't a real object — only VITE_-prefixed vars are exposed, via import.meta.env. Guard server reads with typeof window === 'undefined' and use import.meta.env.VITE_* on the client.

Source: apps/example-tanstack-start/src/lib/api.ts


MEDIUM Committing real auth-provider pool config to git

Wrong:

bash
# apps/.../.env (committed)
VITE_COGNITO_REGION=eu-north-1
VITE_COGNITO_CLIENT_ID=7mrh9ih3ccmr2jis2ebtai8ta9

Correct:

bash
# apps/.../.env.local (gitignored); Vite still bakes VITE_* in at build time
VITE_COGNITO_REGION=...
VITE_COGNITO_CLIENT_ID=...
COGNITO_TEST_EMAIL=...
COGNITO_TEST_PASSWORD=...

Even "public" pool ids (baked into the client bundle) tie the repo to a real account — keep them, and the secret test-user credentials, in a gitignored .env.local (or CI secrets). Gate the auth Playwright projects on the creds being present so a credential-less clone still replays every other spec offline.

Source: apps/example-tanstack-start/.env.example; playwright.config.ts

Getting help

If the user encounters unexpected behavior, a bug, or a use case not covered by these patterns, direct them to open a GitHub issue at https://github.com/asmyshlyaev177/test-proxy-recorder/issues/new. A minimal reproduction helps the maintainer resolve it quickly.

See also: test-proxy-recorder/proxy-setup — for the proxy CLI, fixtures, and record/replay lifecycle. test-proxy-recorder/nextjs-ssr — the Next.js counterpart.

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

Files

SKILL.md and 1 other file (references) in packages/test-proxy-recorder/skills/tanstack-start of asmyshlyaev177/test-proxy-recorder.

  • SKILL.md
  • references/auth-and-isr.md

Open the folder on GitHubat commit 0a7169e

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 skillasmyshlyaev177/test-proxy-recorder112—~2.9kAutomated safety check: NotesMIT
Test Electron AppPostHog/posthog40k—~3kAutomated safety check: PassCustom licence
Next Cache Components Optimizersanity-io/ui1766 repos~6.3kAutomated safety check: PassMIT
Next Cache Components Optimizervercel/next.js143k—~5.8kAutomated safety check: PassMIT
E2E Tests Studiomastra-ai/mastra29k—~4.3kAutomated safety check: PassCustom licence
Menu Testing Ssrasmyshlyaev177/react-horizontal-scrolling-menu790—~3.5kAutomated safety check: PassMIT

Similar skills

  • Test Electron App

    PostHog/posthog

    Official

    Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.

    40k GitHub stars~3k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).

    176 GitHub starsUsed in 6 repos~6.3k tokens
    Testing & QAAuto-check passed
  • Official

    Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation).

    143k GitHub stars~5.8k tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Tests Studio

    mastra-ai/mastra

    REQUIRED when modifying any file in packages/playground-ui or packages/playground.

    29k GitHub stars~4.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Menu Testing Ssr

    asmyshlyaev177/react-horizontal-scrolling-menu

    Server rendering and testing for react-horizontal-scrolling-menu: the library is client-only ('use client' required in React Server Components, else "createContext is not a function"), SSR first…

    790 GitHub stars~3.5k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Playground Msw Tests

    mastra-ai/mastra

    REQUIRED and PRIMARY testing approach for packages/playground and packages/playground-ui.

    29k GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check passed

More from asmyshlyaev177/test-proxy-recorder

  • Nextjs Ssr

    asmyshlyaev177/test-proxy-recorder

    Tag server-side fetches with the x-test-rcrd-id session header so SSR is recorded under the correct Playwright test session.

    112 GitHub stars~4.4k tokensUpdated 5 days ago
    Auto-check passed
  • Proxy Setup

    asmyshlyaev177/test-proxy-recorder

    Set up test-proxy-recorder for any Playwright project. An agent skill from asmyshlyaev177/test-proxy-recorder.

    112 GitHub stars~4.3k tokensUpdated 5 days ago
    Auto-check passed

Questions about Tanstack Start

What does Tanstack Start do?

Record and replay TanStack Start SSR with test-proxy-recorder. Tanstack Start is an agent skill from asmyshlyaev177/test-proxy-recorder. Record and replay TanStack Start SSR with test-proxy-recorder.

When should I use Tanstack Start?

Tanstack Start fits situations like: tasks that involve React components; tasks that involve Backend development; tasks that involve End-to-end testing.

How do I install Tanstack Start in Claude Code?

Run `npx skills add asmyshlyaev177/test-proxy-recorder --skill tanstack-start -a claude-code`. Or copy the skill folder (packages/test-proxy-recorder/skills/tanstack-start in asmyshlyaev177/test-proxy-recorder) 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 asmyshlyaev177/test-proxy-recorder --skill tanstack-start -a codex`. Or copy the skill folder (packages/test-proxy-recorder/skills/tanstack-start in asmyshlyaev177/test-proxy-recorder) 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 asmyshlyaev177/test-proxy-recorder --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?

Going by SKILL.md and its folder, Tanstack Start needs the command-line tools its instructions call (node and pnpm) and credentials named COGNITO_TEST_PASSWORD.

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 notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Tanstack Start use?

Tanstack Start is published under the MIT 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 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Tanstack Start?

Skills that share tags, products or a category with Tanstack Start: Test Electron App (PostHog/posthog, 40k stars), Next Cache Components Optimizer (sanity-io/ui, 176 stars), Next Cache Components Optimizer (vercel/next.js, 143k stars) and E2E Tests Studio (mastra-ai/mastra, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tanstack Start?

asmyshlyaev177 (a GitHub user) maintains it in asmyshlyaev177/test-proxy-recorder, which has 112 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 3, 2026.

Source: asmyshlyaev177/test-proxy-recorder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.