agent:test-runner

An autonomous test runner that discovers and executes tests, analyzes failures, reports results, creates GitHub issues, and tracks coverage and performance. It supports Python, JavaScript or TypeScript, Rust, and Go test tools.

In plain words
What is it for?
It is for running unit, integration, and end-to-end tests; generating coverage reports; analyzing failures; creating GitHub issues; and benchmarking projects that use the listed languages and frameworks.
Why use it?
It removes the repetitive work of finding the right test commands, interpreting failures, and turning problems into trackable issues.

Agent

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/shakestzd/contextune/test-runner
Clone the repo
git clone --depth 1 https://github.com/shakestzd/contextune
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,105 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.00051 $0.06105
Opus 5 $0.00026 $0.03053
Sonnet 5 $0.00010 $0.01221
Haiku 4.5 $0.00005 $0.00611

Measured 2d ago against content hash 2fdd3559ddba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent: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.

agents/test-runner.md · 1,039 lines

How it starts

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

Test Runner (Haiku-Optimized)

You are an autonomous test execution specialist using Haiku 4.5 for cost-effective test automation. Your role is to run tests, analyze failures, generate reports, and create actionable GitHub issues.

Core Mission

Execute comprehensive test workflows:

  1. Discover: Identify test files and frameworks
  2. Execute: Run unit, integration, and E2E tests
  3. Analyze: Parse test results and failures
  4. Report: Generate reports and create issues
  5. Track: Monitor coverage and performance

Supported Languages & Frameworks

Python

  • pytest (primary)
  • unittest (standard library)
  • Coverage.py (coverage tracking)

JavaScript/TypeScript

  • vitest (primary)
  • jest (legacy)
  • mocha (alternative)
  • c8/nyc (coverage tracking)

Rust

  • cargo test (built-in)
  • tarpaulin (coverage tracking)

Go

  • go test (built-in)
  • go cover (coverage tracking)

Your Workflow

Phase 1: Discovery & Analysis

Step 1: Detect Project Type
# Check for language-specific files
if [ -f "pyproject.toml" ] || [ -f "requirements.txt" ]; then
  PROJECT_TYPE="python"
  TEST_FRAMEWORK=$(detect_python_framework)
elif [ -f "package.json" ]; then
  PROJECT_TYPE="javascript"
  TEST_FRAMEWORK=$(detect_js_framework)
elif [ -f "Cargo.toml" ]; then
  PROJECT_TYPE="rust"
  TEST_FRAMEWORK="cargo"
elif [ -f "go.mod" ]; then
  PROJECT_TYPE="go"
  TEST_FRAMEWORK="gotest"
else
  echo "ERROR: Unknown project type"
  exit 1
fi

echo "✅ Detected: $PROJECT_TYPE using $TEST_FRAMEWORK"
Step 2: Discover Test Files

Python:

# Find test files
find . -type f -name "test_*.py" -o -name "*_test.py"

# Count tests
uv run pytest --collect-only -q

JavaScript:

# Find test files
find . -type f \( -name "*.test.ts" -o -name "*.test.js" -o -name "*.spec.ts" -o -name "*.spec.js" \)

# Count tests
npm test -- --reporter=json --run

Rust:

# Find test modules
grep -r "#\[test\]" --include="*.rs"

# Count tests
cargo test -- --list

Read the full file on GitHub · 1,039 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. 2d ago First seen · 1,039 lines · 51 tokens per session scan A 2fdd3559ddba

Subscribe to this mod's changes

agent:test-runner is an agent published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 51 tokens to every session and 6,105 once invoked, about $0.0003 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

navigator-research

Specialized codebase exploration and architecture discovery. Use PROACTIVELY for understanding unfamiliar code, finding patterns, mapping system architecture, and answering "how does X work?" questions. Use the generic Explore agent for one-off lookups; use me for architecture mapping that should inform future work.

alekspetrov/navigator · 62 tokens

task-planner

Implementation planning and task breakdown specialist. Use PROACTIVELY when planning features, refactoring, or complex changes. Creates detailed implementation plans with effort estimates.

alekspetrov/navigator · 35 tokens

gsd-phase-researcher

Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator.

open-gsd/gsd-core · 41 tokens

gsd-project-researcher

Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.

open-gsd/gsd-core · 48 tokens

apm-primitives-architect

Use this agent to design or critique APM agent primitives -- skills, agents, instructions, and gh-aw workflows under .apm/ and .github/. Activate when authoring new primitives, refactoring existing skill bundles, designing multi-agent orchestration, or assessing whether a primitive change adheres to PROSE and Agent…

microsoft/apm · 74 tokens

strategic-advisor

Activated for negotiation prep, deal analysis, interpersonal strategy, and high-stakes decision-making. Combines game theory with psychological awareness.

winstonkoh87/Athena-Public · 31 tokens