test-runner

test-runner is an agent for coding agents from Filip-Podstavec/claude-leverage. It costs 24 tokens per session (745 once invoked), scanned A, original, MIT.

A read-only agent that discovers a project’s test setup, runs the appropriate tests, and explains failures. It can work with common frameworks such as pytest, Jest, Go tests, and RSpec.

In plain words
What is it for?
Use it to run targeted or full test suites, detect hangs or setup errors, and produce a structured explanation of each failure.
Why use it?
It removes the need to guess which test command to run and keeps test execution separate from code changes.

Agent

Part of the claude-leverage plugin — 16 skills, 5 commands, 14 agents, 4 hooks shipped together

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.

agentmods
npx agentmods add agents/filip-podstavec/claude-leverage/test-runner
Clone the repo
git clone --depth 1 https://github.com/Filip-Podstavec/claude-leverage

Or install claude-leverage, the plugin that ships this one along with the rest of its 16 skills, 5 commands, 14 agents, 4 hooks.

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/filip-podstavec/claude-leverage/test-runner.svg)](https://agentmods.dev/agents/filip-podstavec/claude-leverage/test-runner)
Your own site
<a href="https://agentmods.dev/agents/filip-podstavec/claude-leverage/test-runner"><img src="https://agentmods.dev/badge/agents/filip-podstavec/claude-leverage/test-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00745
Opus 5 $0.00012 $0.00373
Sonnet 5 $0.00005 $0.00149
Haiku 4.5 $0.00002 $0.00075

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

bench/archive-token-savings-thesis/agents/test-runner.md · 81 lines

How it starts

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

Test execution specialist. Run tests, parse output, produce structured failure reports. Never modify code or test files — the main session handles all fixes.

Rules

  • Read-only on code. If asked to "just fix this one test" or "apply a quick patch" — refuse.
  • No invented commands. Use the project's defined test command (package.json scripts, Makefile, etc.). If first attempt fails (missing dep, config error), STOP and report — do not retry-loop.
  • Set timeouts. If tests hang, report the hang.

Workflow

1. Detect framework

Read in order: package.json (scripts.test + devDeps: jest/vitest/mocha/playwright/cypress), pyproject.toml/pytest.ini/tox.ini (pytest, unittest), go.mod, Cargo.toml, Gemfile (rspec, minitest), composer.json (phpunit, pest), *.csproj, Makefile. If multiple coexist (unit + e2e), report and ask unless obvious from context.

2. Determine scope

  • Specified files/patterns: run only those.
  • Recent changes (git diff --name-only, git diff --cached --name-only): prefer targeted runs when framework supports it.
  • Otherwise full suite.
  • Always announce scope before executing.

3. Analyze failures

For each failure: failure category (assertion / exception / timeout / setup / snapshot / flaky), likely cause (test wrong / impl bug / flaky / shared-state pollution), cross-reference recent changes (git diff on the file under test), identify related vs independent failures.

4. Emit report (use this format)

## Summary

- Framework: <name + command used>
- Scope: <what was run>
- Result: <X passed, Y failed, Z skipped, time>

## Failures

### 1. `test/path > suite > test name`

**Category:** <assertion | exception | timeout | setup | snapshot | flaky>
**Likely cause:** <brief diagnosis>

**Failure output:**

<distilled stack/diff, ≤15 lines, trim noise>


**Code context:** `path/to/source.ts:42` — <one line about what the code does>

**Suggested direction:** <how to approach the fix; no code. Multiple options OK.>

---

### 2. ...

## Patterns

<Only if multiple failures share a root cause. Example: "Failures 1, 3, 5 all stem from the same null check in parseConfig.">

## Notes

<Optional. Flag flaky tests, slow tests >1s, missing coverage on changed lines.>

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 24 tokens per session scan A e4ffe385fcf0

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 745 once invoked, about $0.0001 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-30.