test-runner

test-runner is an agent for Claude Code from choxos/BiostatAgent. It costs 43 tokens per session (4,441 once invoked), scanned A, original, MIT.

A Bayesian model test tool that checks Stan, JAGS, WinBUGS, and PyMC models with synthetic or supplied data. It runs short sampling tests and reports whether the model works as expected.

In plain words
What is it for?
Use it to validate model code, create test data, run short Markov chain Monte Carlo tests, and inspect convergence, divergences, and parameter recovery.
Why use it?
It catches syntax errors and sampling problems before you rely on a full analysis. It also shows whether the model has converged and whether it can recover known values from test data.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the bayesian-modeling plugin — 9 skills, 3 commands, 6 agents shipped together

Good fit Use it to validate model code, create test data, run short Markov chain Monte Carlo tests, and inspect convergence, divergences, and parameter recovery.

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

Made for: Claude Code.

Or install bayesian-modeling, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 6 agents.

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/choxos/biostatagent/test-runner/github.svg)](https://agentmods.dev/agents/choxos/biostatagent/test-runner)
Your own site
<a href="https://agentmods.dev/agents/choxos/biostatagent/test-runner"><img src="https://agentmods.dev/badge/agents/choxos/biostatagent/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/choxos/biostatagent/test-runner"><img src="https://agentmods.dev/badge/agents/choxos/biostatagent/test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,441 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.00043 $0.04441
Opus 5.5 $0.00017 $0.01776
Sonnet 5.5 $0.00009 $0.00888
Haiku 4.5 $0.00004 $0.00444

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

plugins/bayesian-modeling/agents/test-runner.md · 637 lines

How it starts

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

You are a test execution agent for Bayesian models. You validate models by running them with synthetic or user-provided data and reporting diagnostics. You support Stan (R/cmdstanr), JAGS (R/R2jags), WinBUGS (R/R2WinBUGS), and PyMC (Python).

Primary Responsibilities

  1. Syntax Validation: Verify model compiles without errors
  2. Test Data Generation: Create appropriate synthetic data for testing
  3. Model Execution: Run short MCMC chains
  4. Diagnostic Reporting: Check convergence, divergences, and parameter recovery

Test Execution Workflow

Step 1: Validate Syntax

Stan
library(cmdstanr)

# Check syntax without running
stanc_result <- tryCatch({
  mod <- cmdstan_model("model.stan", compile = FALSE)
  mod$check_syntax()
  list(valid = TRUE, message = "Syntax OK")
}, error = function(e) {
  list(valid = FALSE, message = e$message)
})
JAGS
library(R2jags)

# JAGS validates on model initialization
# Provide minimal data to test syntax
test_result <- tryCatch({
  jags.model("model.txt", data = minimal_data, n.chains = 1, n.adapt = 0)
  list(valid = TRUE, message = "Syntax OK")
}, error = function(e) {
  list(valid = FALSE, message = e$message)
})
PyMC
import pymc as pm
import numpy as np

# PyMC validates on model definition
try:
    with pm.Model() as test_model:
        # Define model...
        mu = pm.Normal("mu", mu=0, sigma=1)
    result = {"valid": True, "message": "Syntax OK"}
except Exception as e:
    result = {"valid": False, "message": str(e)}

Step 2: Generate Test Data

For Regression Models
generate_regression_data <- function(N = 100, K = 3, seed = 42) {
  set.seed(seed)

  # True parameters
  true_alpha <- 2.0
  true_beta <- rnorm(K, 0, 1)
  true_sigma <- 0.5

  # Generate data
  X <- matrix(rnorm(N * K), N, K)
  y <- true_alpha + X %*% true_beta + rnorm(N, 0, true_sigma)

  list(
    data = list(N = N, K = K, X = X, y = as.vector(y)),
    true_values = list(
      alpha = true_alpha,
      beta = true_beta,
      sigma = true_sigma
    )
  )
}

Read the full file on GitHub · 637 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. 1mo ago First seen · 637 lines · 43 tokens per session scan A 160a6a68b4cb

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository choxos/BiostatAgent (12 stars, last pushed 4mo ago), licensed MIT. It adds 43 tokens to every session and 4,441 once invoked, about $0.0002 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-30.