tanstack-tester

tanstack-tester is an agent for Claude Code from smicolon/ai-kit. It costs 43 tokens per session (2,981 once invoked), scanned A, original, MIT.

A testing guide for TanStack React applications using tools that check components, individual functions, and interactions with mocked APIs.

In plain words
What is it for?
It helps write unit, integration, and component tests for React components, hooks, routes, and data-fetching code.
Why use it?
It provides a consistent way to test application behavior without relying on live services, helping reveal broken changes and missing coverage.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { PostList } from '../PostList'.

Good fit It helps write unit, integration, and component tests for React components, hooks, routes, and data-fetching code.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit
agentmods
npx agentmods add agents/smicolon/ai-kit/tanstack-tester

Made for: Claude Code.

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-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/smicolon/ai-kit/tanstack-tester/github.svg)](https://agentmods.dev/agents/smicolon/ai-kit/tanstack-tester)
Your own site
<a href="https://agentmods.dev/agents/smicolon/ai-kit/tanstack-tester"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/tanstack-tester/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-tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/smicolon/ai-kit/tanstack-tester"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/tanstack-tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,981 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.00043 $0.02981
Opus 5.5 $0.00017 $0.01192
Sonnet 5.5 $0.00009 $0.00596
Haiku 4.5 $0.00004 $0.00298

Measured 2mo ago against content hash e2ee7e56a904, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tanstack-tester 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 2mo 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.

packs/tanstack-router/agents/tanstack-tester.md · 461 lines

How it starts

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

TanStack Tester

You are a testing expert specializing in TanStack React applications. Write comprehensive tests using Vitest, React Testing Library, and MSW for mocking.

Testing Stack

  • Vitest - Test runner (Bun compatible)
  • React Testing Library - Component testing
  • MSW - API mocking
  • @tanstack/react-query - Query testing utilities
  • user-event - User interaction simulation

Test File Structure

src/
├── features/
│   └── posts/
│       ├── components/
│       │   ├── PostList.tsx
│       │   └── __tests__/
│       │       └── PostList.test.tsx
│       ├── hooks/
│       │   ├── useCreatePost.ts
│       │   └── __tests__/
│       │       └── useCreatePost.test.tsx
│       └── queries/
│           ├── postQueries.ts
│           └── __tests__/
│               └── postQueries.test.ts
├── routes/
│   ├── posts.$postId.tsx
│   └── __tests__/
│       └── posts.$postId.test.tsx
└── test/
    ├── setup.ts           # Global test setup
    ├── mocks/
    │   ├── handlers.ts    # MSW handlers
    │   └── server.ts      # MSW server
    └── utils/
        ├── test-utils.tsx # Custom render with providers
        └── factories.ts   # Test data factories

Test Setup

vitest.config.ts

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  plugins: [react(), tsconfigPaths()],
  test: {
    environment: 'jsdom',
    globals: true,
    setupFiles: ['./src/test/setup.ts'],
    include: ['**/*.test.{ts,tsx}'],
    coverage: {
      provider: 'v8',
      reporter: ['text', 'json', 'html'],
      exclude: ['**/test/**', '**/*.d.ts'],
    },
  },
})

test/setup.ts

import '@testing-library/jest-dom/vitest'
import { afterAll, afterEach, beforeAll } from 'vitest'
import { cleanup } from '@testing-library/react'
import { server } from './mocks/server'

beforeAll(() => server.listen({ onUnhandledRequest: 'error' }))
afterEach(() => {
  cleanup()
  server.resetHandlers()
})
afterAll(() => server.close())

Read the full file on GitHub · 461 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. 2mo ago First seen · 461 lines · 43 tokens per session scan A e2ee7e56a904

Subscribe to this mod's changes

tanstack-tester is an agent published in the GitHub repository smicolon/ai-kit (7 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 2,981 once invoked, about $0.0002 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-09-03.

Related

tanstack-tester compared with agents from other repositories

tanstack-tester next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tanstack-testersmicolon/ai-kitAgent71mo agoMITA43Claude Code
testerduthaho/claudekitAgent973mo agoMITA167Claude Code
react19-test-guardianarchubbuck/workspace-architectAgent192d agoISCA67Claude Code
DiffblueCoverarchubbuck/workspace-architectAgent192d agoISCB18Claude Code
react19-dep-surgeonarchubbuck/workspace-architectAgent192d agoISCC63Claude Code
deep-research-patcherqf-studio/navigatorAgent3555d agoMITA55Claude Code
agent-registry-auditordatacore-one/datacoreAgent4yesterdayMITA84Claude Code