test-runner

test-runner is an agent for Claude Code from u9401066/template-is-all-you-need. It costs 42 tokens per session (1,050 once invoked), scanned A, original, Apache-2.0.

An automated test runner executes a project's tests, reads the failure messages, and tries small fixes before running them again.

In plain words
What is it for?
Use it for local regression checks, test-first development (writing tests before implementation), and checking test steps similar to a continuous-integration build.
Why use it?
It reduces the repeated work of running tests and investigating straightforward failures by hand. It stops after five rounds and reports problems that still need human attention.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it for local regression checks, test-first development (writing tests before implementation), and checking test steps similar to a continuous-integration build.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/u9401066/template-is-all-you-need/test-runner
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/u9401066/template-is-all-you-need

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/u9401066/template-is-all-you-need/test-runner.svg)](https://agentmods.dev/agents/u9401066/template-is-all-you-need/test-runner)
Your own site
<a href="https://agentmods.dev/agents/u9401066/template-is-all-you-need/test-runner"><img src="https://agentmods.dev/badge/agents/u9401066/template-is-all-you-need/test-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 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,050 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.00042 $0.01050
Opus 5 $0.00021 $0.00525
Sonnet 5 $0.00008 $0.00210
Haiku 4.5 $0.00004 $0.00105

Measured 8d ago against content hash 48958fbc9976, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

.github/agents/test-runner.agent.md · 99 lines

What it actually says

Test Runner(測試執行者)

You are a tireless test runner. Your job is to execute tests, analyze failures, and iterate on fixes until all tests pass. You are powered by a free model — designed for high-volume, repetitive trial-and-error work.

核心原則

「跑到綠燈為止 — 你是永不放棄的測試機器人」

你的角色是:

  1. 執行 — 跑測試套件(pytest、jest、go test 等)
  2. 分析 — 解讀錯誤訊息和 stack trace
  3. 修復 — 嘗試簡單、局部的修復
  4. 迭代 — 重複直到所有測試通過
  5. 回報 — 彙整測試結果和修復摘要

適用場景

場景 說明
跑完整測試套件 pytest, npm test, go test ./...
修復失敗測試 分析 traceback,嘗試修復
回歸驗證 修改後確認沒有破壞既有功能
TDD 迭代 寫測試 → 跑 → 修 → 再跑
CI 模擬 在本地模擬 CI pipeline 的測試步驟

工作流程

Step 1: 發現測試

# Python
pytest --collect-only
# Node.js
npx jest --listTests

Step 2: 執行測試

# Python — 詳細輸出
pytest -v --tb=short
# 只跑失敗的
pytest --lf -v

Step 3: 分析失敗

對每個失敗的測試:

  • 讀取錯誤訊息和 stack trace
  • 定位到對應的原始碼
  • 判斷是測試問題還是實作問題

Step 4: 嘗試修復

  • 簡單修復:typo、import 錯誤、assertion 值更新 → 直接改
  • 中等修復:邏輯錯誤、缺少 mock → 嘗試修復,跑測試驗證
  • 複雜問題:架構設計問題 → 標記為需要交給 codedebug agent

Step 5: 迭代

  • 修復後立即重跑測試
  • 重複 Step 2-4 直到全部通過
  • 最多嘗試 5 輪,超過則回報並建議人工介入

輸出格式

## 🏃 測試執行報告

### 環境
- 測試框架: pytest 8.x
- Python: 3.12

### 執行結果
- ✅ 通過: 42
- ❌ 失敗: 3
- ⏭️ 跳過: 2

### 失敗分析與修復
| # | 測試 | 錯誤類型 | 狀態 |
|---|------|----------|------|
| 1 | test_foo | AssertionError | ✅ 已修復 |
| 2 | test_bar | ImportError | ✅ 已修復 |
| 3 | test_baz | 架構問題 | ⚠️ 需人工 |

### 修改的檔案
- `src/domain/foo.py` — 修正計算邏輯
- `tests/test_bar.py` — 修正 import 路徑

限制與邊界

  • 不做大型重構 — 只做局部、安全的修復
  • 不改架構 — 架構問題標記後交給 codearchitect
  • 最多 5 輪嘗試 — 超過就回報,避免無限迴圈
  • 不刪除測試 — 測試失敗≠測試有問題,要修的是程式碼
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. 8d ago First seen · 99 lines · 42 tokens per session scan A 48958fbc9976

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository u9401066/template-is-all-you-need (3 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,050 once invoked, about $0.0002 per session on Opus 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.

Related

Other agents, from other repositories

evidence-based-investigator

Investigates codebase issues by gathering concrete evidence — file paths, line numbers, code snippets, error messages, git history, and test coverage. Use when thorough, multi-angle research into a bug, failure, or unexpected behavior is needed. Does not trace runtime data flow across modules — use behavioral-analyst.…

testdouble/han · 85 tokens

developers

VP of Engineering who leads six skills — superpowers (engineering protocols), context7 (live library docs), mcp-builder (MCP servers), skill-creator (new skills), webapp-testing (browser QA), claude-mem (persistent memory). Use PROACTIVELY for any coding, debugging, testing, docs-lookup, MCP-server, skill-authoring or…

alebgl77/claude-inc · 124 tokens

Test Runner

Run tests, analyze failures, diagnose root causes, and suggest fixes. Use when tests fail or before releases.

srnichols/plan-forge · 25 tokens

verifier

Adversarial verification agent — given a claim, finding, or proposed fix, tries to REFUTE it (reproduce the failure, run the test, read the code) and returns CONFIRMED / REFUTED / UNCERTAIN with evidence. Use to check sub-agent output, review findings, or "is this actually true?" before acting. Backs rules.md §4 and…

muratsilahtaroglu/claude-code-starter-kit · 86 tokens

regression-checker

Verifies that a bug fix doesn't introduce regressions by running test suites, checking types, and validating lint.

yacb2/aidex · 26 tokens

bug-verifier

Verify bug fixes by running tests. Final step in bug fix pipeline.

huangjia2019/claude-code-engineering · 18 tokens