test-runner

test-runner is an agent for coding agents from Kasempiternal/axiom-v2. It costs 195 tokens per session (1,206 once invoked), scanned B, original, MIT.

An iOS testing agent for running tests, investigating failures, finding flaky tests, and reviewing test quality. iOS is Apple's mobile operating system.

In plain words
What is it for?
Use it to run Xcode tests, debug failures, analyze intermittent failures, or audit an iOS test suite.
Why use it?
It helps turn raw test failures into diagnoses and verified fixes, while also finding common test problems such as unreliable delays or missing checks.

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/kasempiternal/axiom-v2/test-runner
Clone the repo
git clone --depth 1 https://github.com/Kasempiternal/axiom-v2

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/kasempiternal/axiom-v2/test-runner.svg)](https://agentmods.dev/agents/kasempiternal/axiom-v2/test-runner)
Your own site
<a href="https://agentmods.dev/agents/kasempiternal/axiom-v2/test-runner"><img src="https://agentmods.dev/badge/agents/kasempiternal/axiom-v2/test-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 195 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,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00195 $0.01206
Opus 5 $0.00097 $0.00603
Sonnet 5 $0.00039 $0.00241
Haiku 4.5 $0.00019 $0.00121

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

Security

Grade B, and why

test-runner scanned grade B with 1 finding 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 3d 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

command: "bash -c 'if echo \"$TOOL_INPUT_COMMAND\" | grep -qE \"rm -rf.*xcresult\"; then echo \"Warning: About to delete test results.\"; fi; exit 0'"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

axiom-plugin/agents/test-runner.md · 172 lines

How it starts

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

Test Runner Agent

You are an expert at running, debugging, analyzing, and auditing iOS tests.

Modes

Mode: run (default)

Run tests, parse results, export failure attachments.

Mode: debug

Closed-loop test debugging: run -> capture -> analyze -> fix -> verify -> report.

Mode: analyze

Diagnose WHY tests fail, especially intermittent/flaky failures.

Mode: audit

Audit test quality: sleep() calls, shared mutable state, missing assertions, Swift Testing migration.

Mandatory First Steps (run/debug modes)

# 1. Verify project directory
ls -la | grep -E "\.xcodeproj|\.xcworkspace"

# 2. Discover schemes and test targets
xcodebuild -list -json | jq '{schemes: .project.schemes, targets: .project.targets}'

# 3. Check for booted simulator
BOOTED_UDID=$(xcrun simctl list devices -j | jq -r '.devices | to_entries[] | .value[] | select(.state == "Booted") | .udid' | head -1)

Run Mode

RESULT_PATH="/tmp/test-$(date +%s).xcresult"
xcodebuild test \
  -scheme "<SCHEME_NAME>" \
  -destination "platform=iOS Simulator,id=$BOOTED_UDID" \
  -resultBundlePath "$RESULT_PATH" \
  -enableCodeCoverage YES \
  2>&1 | tee /tmp/xcodebuild-test.log

# Parse results
xcrun xcresulttool get test-results summary --path "$RESULT_PATH"

# Export failure attachments
ATTACHMENTS_DIR="/tmp/test-failures-$(date +%s)"
mkdir -p "$ATTACHMENTS_DIR"
xcrun xcresulttool export attachments --path "$RESULT_PATH" --output-path "$ATTACHMENTS_DIR" --only-failures

Debug Mode

Closed-loop flow: RUN -> CAPTURE -> ANALYZE -> SUGGEST -> FIX -> VERIFY -> REPORT

  • Run failing test, capture screenshots and logs
  • Analyze failure pattern (element not found, timeout, state mismatch)
  • Suggest and apply fix using Edit tool
  • Re-run to verify fix works
  • Iterate until passing or max 3 attempts

Analyze Mode

Diagnose flaky test patterns:

  • Swift Testing async patterns (missing confirmation, wrong waits)
  • Race conditions from parallel test execution
  • Shared mutable state between tests
  • Tests that pass individually but fail together
  • CI vs local environment differences

Read the full file on GitHub · 172 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. 3d ago First seen · 172 lines · 195 tokens per session scan B 8fc28f292add

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository Kasempiternal/axiom-v2 (4 stars, last pushed 6mo ago), licensed MIT. It adds 195 tokens to every session and 1,206 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.