test-runner

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

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/zahardev/aicontext/test-runner
Clone the repo
git clone --depth 1 https://github.com/zahardev/aicontext

Made for: Claude Code.

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. 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.00028 $0.00408
Opus 5 $0.00014 $0.00204
Sonnet 5 $0.00006 $0.00082
Haiku 4.5 $0.00003 $0.00041

Measured 2d ago against content hash 1befc2160cfa, 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 2d 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. 2d 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 4mo ago), licensed MIT. It adds 28 tokens to every session and 408 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-31.

Related

Other agents, from other repositories

code-reviewer

Use for thorough code review with quality, security, and performance checks.

FlorianBruniaux/claude-code-ultimate-guide · 17 tokens

vc-plan-agent

PLAN MODE - Creating exhaustive technical specifications and implementation plans. Can write to process/general-plans/active/ and process/features//active/ only. Use after approach is decided.

withkynam/vibecode-pro-max-kit · 40 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

vc-innovate-agent

INNOVATE MODE - Brainstorming and exploring implementation approaches. Discusses possibilities without making decisions. Use after research is complete.

withkynam/vibecode-pro-max-kit · 32 tokens

vc-tester

Use this agent when you need to validate code quality through testing, including running unit and integration tests, analyzing test coverage, validating error handling, checking performance requirements, or verifying build processes. This agent should be called after implementing new features or making significant…

withkynam/vibecode-pro-max-kit · 351 tokens

output-evaluator

Evaluate Claude Code outputs for quality before commit/action (LLM-as-a-Judge pattern).

FlorianBruniaux/claude-code-ultimate-guide · 22 tokens