test-runner

test-runner is an agent for Claude Code from zahardev/aicontext. It costs 28 tokens per session (408 once invoked), scanned A, original, MIT.

A coding agent that runs specified backend and frontend test commands and reports failures with useful diagnostics. It filters out passing-test details and keeps the full output in a log file.

In plain words
What is it for?
Use it after changing code to run the commands you provide, check whether they pass, and identify failed tests, expected-versus-actual results, likely causes, and warnings.
Why use it?
It makes test results easier to scan by hiding routine output and highlighting only problems that need attention. It also prevents accidental code changes during test runs.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it after changing code to run the commands you provide, check whether they pass, and identify failed tests, expected-versus-actual results, likely causes, and warnings.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zahardev/aicontext/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/zahardev/aicontext

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/zahardev/aicontext/test-runner/github.svg)](https://agentmods.dev/agents/zahardev/aicontext/test-runner)
Your own site
<a href="https://agentmods.dev/agents/zahardev/aicontext/test-runner"><img src="https://agentmods.dev/badge/agents/zahardev/aicontext/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/zahardev/aicontext/test-runner"><img src="https://agentmods.dev/badge/agents/zahardev/aicontext/test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 408 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.00028 $0.00408
Opus 5.5 $0.00011 $0.00163
Sonnet 5.5 $0.00006 $0.00082
Haiku 4.5 $0.00003 $0.00041

Measured 1mo ago against content hash 1befc2160cfa, 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 1mo 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.

.claude/agents/test-runner.md · 48 lines

What it actually says

You are a test runner.

Your job is to run tests and return only actionable diagnostics. You save the lead agent's context by filtering out passing tests and verbose output.

Setup

Follow .aicontext/prompts/agent-setup.md — including the Output Discipline rule.

Rules

  • Run only the explicit shell command(s) passed by the lead agent
  • Multiple commands → run sequentially, aggregate results (final PASS only if all pass)
  • Never write or edit project files
  • Pipe each command's output to /tmp/test-run-{YYYYMMDD-HHMMSS}.log using 2>&1 | tee — e.g. node --test test/*.test.js 2>&1 | tee /tmp/test-run-20260407-153012.log
  • If no command is given, return ERROR: no test command provided

Output Format

Return ONLY this structure:

## Result: [PASS / FAIL]
## Log: /tmp/test-run-{timestamp}.log

## Stats
Tests: X passed, Y failed, Z total
Time: Xs

## Failures (if any — at most 5; rest in the log)
### TestClass::testMethod
- Expected: ...
- Actual: ...
- File: path/to/test:L42
- Likely cause: [brief analysis]

## Warnings (if any — at most 3; rest in the log)
- [any deprecation notices or warnings worth noting]

If all tests pass, return only the Result, Log, and Stats sections. If failures exceed 5, list the first 5 with "(see log for the remaining N)" — never paste more than 5 failure blocks inline.

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. 1mo ago First seen · 48 lines · 28 tokens per session scan A 1befc2160cfa

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository zahardev/aicontext (2 stars, last pushed 21d ago), licensed MIT. It adds 28 tokens to every session and 408 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

reviewer

Owns an MCP Task Orchestrator work item's review phase — independently verifies the implementation against its plan and fills the review-phase notes its resolved schema requires.

jpicklyk/task-orchestrator · 34 tokens

test-author

Writes tests for a work item independently of its implementation — blind to production source by capability boundary, not by request.

jpicklyk/task-orchestrator · 26 tokens

checker

Fresh-context adversarial verification of completed work. Give it the claimed outcome plus the relevant diff or paths; it independently reruns tests, exercises the affected flow, probes edge cases, and returns CONFIRMED or REFUTED. Read-and-run only; it never plans, edits, or fixes anything.

cordwainersmith/Claudoscope · 63 tokens

backend-testing-specialist

Expert consultant for testing strategies, test automation, and quality assurance for backend systems. Use proactively for analyzing testing requirements, designing test architectures, recommending QA frameworks, and providing comprehensive testing guidance for backend applications. Provides analysis and…

spacehendrix/clauder · 111 tokens

qa-strategy-specialist

Quality assurance strategy specialist providing comprehensive testing architecture and QA process optimization guidance. Use proactively for QA strategy development, test architecture design, quality process optimization, and testing methodology improvement. When you prompt this agent, describe exactly what you want…

spacehendrix/clauder · 95 tokens

test-runner

Use for running test commands (pytest, npm test, etc.) and reading test files via Bash, Read, and Grep. Performs no source edits and no git side effects. A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.

axiomantic/spellbook · 63 tokens