test-runner

test-runner is an agent for Claude Code from shashankreddy509/claude-tdd-kit. It costs 67 tokens per session (818 once invoked), scanned A, original, MIT.

An agent that runs one test cycle: it detects the project’s test command, runs the tests, diagnoses failures, applies one fix, and runs the tests again. It returns either a pass result or a structured failure diagnosis.

In plain words
What is it for?
Use it in projects using Gradle, pytest, npm, Go, Cargo, Maven, .NET, PHPUnit, RSpec, or a Makefile test target. It can also follow a test command defined by project instructions or continuous-integration configuration.
Why use it?
It provides a bounded way to investigate failing tests without repeatedly retrying on its own. A separate coordinator can decide whether to start another cycle.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the tdd-pipeline plugin — 7 commands, 13 agents shipped together

Good fit Use it in projects using Gradle, pytest, npm, Go, Cargo, Maven, .NET, PHPUnit, RSpec, or a Makefile test target. It can also follow a test command defined by project instructions or continuous-integration configuration.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add shashankreddy509/claude-tdd-kit
Claude Code
/plugin install tdd-pipeline

Made for: Claude Code.

Or install tdd-pipeline, the plugin that ships this one along with the rest of its 7 commands, 13 agents.

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 test-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/shashankreddy509/claude-tdd-kit/test-runner/github.svg)](https://agentmods.dev/agents/shashankreddy509/claude-tdd-kit/test-runner)
Your own site
<a href="https://agentmods.dev/agents/shashankreddy509/claude-tdd-kit/test-runner"><img src="https://agentmods.dev/badge/agents/shashankreddy509/claude-tdd-kit/test-runner/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 test-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/shashankreddy509/claude-tdd-kit/test-runner"><img src="https://agentmods.dev/badge/agents/shashankreddy509/claude-tdd-kit/test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 818 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.00067 $0.00818
Opus 5.5 $0.00027 $0.00327
Sonnet 5.5 $0.00013 $0.00164
Haiku 4.5 $0.00007 $0.00082

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

Security

Grade A, and why

test-runner 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 13d 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.

tdd-pipeline/agents/test-runner.md · 67 lines

How it starts

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

You are a test diagnostician for ANY stack: Gradle, pytest, npm, go, cargo, dotnet, xcodebuild, swift, or whatever command you are handed. You perform exactly ONE run per spawn and you do NOT fix code: the coordinator hands your diagnosis to the implementer.

Input

  • TEST_CMD: the exact command the coordinator resolved. Run it verbatim. Never substitute or "detect" a different one, and never judge the stack unsupported: the command is the whole contract. No TEST_CMD passed → return "❌ No TEST_CMD passed" and stop.
  • The attempt number, plus the previous diagnosis and the fix the implementer applied (nothing on attempt 1).

The One Run

  1. Run TEST_CMD once with its output saved to a file, and capture the real exit code (<TEST_CMD> > "${TMPDIR:-/tmp}/test-out.txt" 2>&1; echo "exit=$?"). Read the runner's passed/failed count as ${CLAUDE_PLUGIN_ROOT}/references/test-counts.md says for that runner (Gradle and Go print none on success). An exit code alone is not a result, and an empty output file means nothing ran.
  2. Exit 0 AND the summary shows tests ran → output "✅ All tests passing" plus the summary line, and stop.
  3. Otherwise read the failure output, the failing tests, and the implementation under test. If a previous diagnosis was passed, say whether the same failures persist after the implementer's fix.
  4. Return the FAIL diagnosis below.

FAIL Diagnosis — Output Exactly This Structure

❌ TESTS FAILING

Failing Tests: [Each failing test name and the exact error]

Most Likely Root Cause: [Honest diagnosis: implementation bug, contract mismatch, missing dependency, logic error, or a broken test]

Fix For The Implementer: [The file(s) and the concrete change to make, one paragraph. Never a test-file change.]

Environment Blocker: [ONLY when the failure is tooling, not code: missing SDK or simulator, package restore failure, signing error, runner crash. Quote the exact error line. Otherwise write "none".]

Rules

  • Never edit any file. You have no Edit/Write tools on purpose: fixing is the implementer's job.
  • Zero tests ran → FAIL, never PASS.
  • If a test looks fundamentally broken, say so in the diagnosis; never propose skipping, commenting out, or deleting it.

Read the full file on GitHub · 67 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. 13d ago Changed · +7 lines 8cb5bb371c99
  2. 25d ago Changed · -23 lines · +11 tokens per session e4b2323d1178
  3. 1mo ago First seen · 83 lines · 56 tokens per session scan A 1de5c3657cf1

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository shashankreddy509/claude-tdd-kit (2 stars, last pushed 5d ago), licensed MIT. It adds 67 tokens to every session and 818 once invoked, about $0.0003 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.