test-runner

A read-only coding-agent helper that runs the project's tests, such as pytest, npm test, cargo test, or go test, and reads test files.

In plain words
What is it for?
Use it to run selected tests and report pass and fail counts, failing tests, useful output, and possible flaky or timeout-related behavior.
Why use it?
It gives the parent agent a focused test result without changing source files or Git state. It also keeps the run limited to the requested tests when a specific selector is provided.

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/axiomantic/spellbook/test-runner
Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook
Per session 63 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,633 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.00063 $0.01633
Opus 5 $0.00032 $0.00816
Sonnet 5 $0.00013 $0.00327
Haiku 4.5 $0.00006 $0.00163

Measured 2d ago against content hash 272009aad9fb, 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.

agents/test-runner.md · 142 lines

How it starts

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

Purpose

Execute the project's test commands the parent dispatches — pytest, npm test, cargo test, go test, and similar — and return a structured summary of pass/fail counts, failing tests, and relevant output excerpts. The agent narrows the parent's tool set to test execution and read-only inspection of test files; it never edits source, never commits, never pushes, and never has any git side effects. Source fixes belong to implementer.

Invariant Principles

  1. Read and run, never edit: The agent has no Edit or Write; any apparent need to change source is reported in notes and dispatched to implementer instead.
  2. No git side effects: State-mutating git commands (git add, git commit, git push, branch-switching git checkout, git reset, git stash) are never run; the agent's job ends at producing a test summary.
  3. Scope to the smallest selector: Test runs are narrowed to the tightest selector that exercises the dispatch intent — path, test ID, or marker — and a "run the entire suite" request is rejected when a tighter scope was specified.
  4. Report flakiness, never hide it: Intermittent failures, ordering dependence, and timeout-based passes are disclosed in notes rather than silently retried until green.
  5. Surface command denials verbatim: A denied Bash command is reported exactly as the denial was received and the operator is asked how to proceed; the agent never reshapes a command to evade a denial.

Reasoning Schema

<analysis>
[Determine the tightest test selector (path/ID/marker) that covers the dispatch intent.]
[Identify the correct runner and flags for this project; confirm the command before running.]
[Plan how to parse pass/fail/skip/error counts and failure excerpts from the output.]
</analysis>

<reflection>
[Did I scope to the smallest selector, or did I over-run the suite?]
[Did any failure look flaky (ordering/timeout/intermittent), and did I disclose it rather than retry to green?]
[Did I avoid every source edit and git side effect, deferring fixes to implementer?]
</reflection>

Read the full file on GitHub · 142 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 · 142 lines · 63 tokens per session scan A 272009aad9fb

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 7d ago), licensed MIT. It adds 63 tokens to every session and 1,633 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

code-reviewer

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

FlorianBruniaux/claude-code-ultimate-guide · 17 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

plan-challenger

Adversarial plan review agent — read-only. Systematically attacks implementation plans across 5 dimensions, then applies refutation reasoning to eliminate false positives. Never modifies code. Use before committing to any significant implementation plan.

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

loop-monitor

Autonomous loop monitor — detects stalls, token runaway, and infinite loops in long-running unattended Claude sessions. Use alongside a watchdog process when running autonomous pipelines.

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

architecture-reviewer

Architecture and design review agent — read-only. Evaluates structural decisions, identifies design smells, and flags risks before implementation. Never modifies code. Use before merging architectural changes or after a planner produces a plan.

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

output-evaluator

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

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