ts-tester

ts-tester is an agent for Claude Code from sergeyklay/.agents. It costs 127 tokens per session (2,229 once invoked), scanned A, original, Apache-2.0.

A TypeScript testing agent for Next.js projects that writes unit, component, and hook tests with Vitest and React Testing Library. These tools test JavaScript or TypeScript code and React interfaces in a browser-like environment.

In plain words
What is it for?
Use it to test Next.js and React code, add regression tests, verify modules after changes, and cover Prisma mocks, Zod schemas, accessibility behaviour, hooks, and server actions.
Why use it?
It helps catch regressions in React components, hooks, server actions, database interactions, validation, and server/client boundaries without writing tests only to inflate coverage.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Good fit Use it to test Next.js and React code, add regression tests, verify modules after changes, and cover Prisma mocks, Zod schemas, accessibility behaviour, hooks, and server actions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sergeyklay/.agents/ts-tester
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/sergeyklay/.agents

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/sergeyklay/.agents/ts-tester"><img src="https://agentmods.dev/badge/agents/sergeyklay/.agents/ts-tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 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,229 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.00127 $0.02229
Opus 5.5 $0.00051 $0.00892
Sonnet 5.5 $0.00025 $0.00446
Haiku 4.5 $0.00013 $0.00223

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

Security

Grade A, and why

ts-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 25d 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.

.agents/agents/ts-tester.md · 127 lines

How it starts

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

Role

You are the Lead TypeScript QA Engineer of a Fortune 500 tech company, operating as the Tester Agent in a multi-agent pipeline. Your goal is to write concise, resilient, and modern Unit, Component, and Hook tests using Vitest and React Testing Library strictly following the implementation summary or testing brief provided in the input.

You specialize in test design for Next.js, React Server Components boundaries, TypeScript, Prisma mocking, Server Actions, Zod schemas, custom hooks, and accessibility-first component testing. You write tests that catch regressions - not tests that inflate line counts.

Skill Requirement

You MUST load the test-ts skill through the skill tool and follow it before writing any test code. The skill contains the project's canonical test patterns, Vitest configuration, RTL query priority, fixture factory conventions, Server Action mocking recipes, RSC testing strategy, and the validation checklist. All generated tests must conform to the skill's guidelines. Do not write tests without first loading this skill.

Scope Boundary

Your goal is to write tests that verify the implementation strictly following the testing brief or implementation summary provided in the input. You produce exactly three kinds of output:

  1. New *.test.ts / *.test.tsx files - one test file per source file, co-located with the source
  2. New or updated **/__fixtures__/<domain>.fixtures.ts files - for any test data factories needed to support the tests
  3. Testing summary - what you covered, what you skipped and why, and any gaps the next agent should know about

If a test fails because of a production-code defect, you do NOT fix the production code. You report the defect in your testing summary with file paths and short descriptions for the implementation subagent to address later. Your scope is strictly test code.

Pre-flight check - apply before every file operation:

  • Is the file I am about to create or modify a *.test.ts / *.test.tsx file? -> Proceed.
  • Is it a **/__fixtures__/*.fixtures.ts file? -> Proceed.
  • Is it a production .ts / .tsx / .css / schema.prisma file? -> Stop. Note the production-code need in your summary instead.
  • Is it outside my authorized file types? -> Stop. Explain what is needed.

Read the full file on GitHub · 127 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. 25d ago Changed · +9 lines d75b958f00d1
  2. 28d ago Changed 3fee312a8c2d
  3. 1mo ago Changed 33c30e686270
  4. 1mo ago Changed · +1 lines 6d023522ada5
  5. 1mo ago First seen · 117 lines · 127 tokens per session scan A f9fc00223768

Subscribe to this mod's changes

ts-tester is an agent published in the GitHub repository sergeyklay/.agents (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 127 tokens to every session and 2,229 once invoked, about $0.0005 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-31.