mb-test-runner

mb-test-runner is an agent for Claude Code from fockus/skill-memory-bank. It costs 64 tokens per session (1,625 once invoked), scanned A, original, MIT.

A structured test runner that detects the project's technology stack, runs its tests, and reports the results as JSON. JSON is a machine-readable text format.

In plain words
What is it for?
Use it to run a project's test suite, count passed and failed tests, and list each failure with its file, test name, and first error details.
Why use it?
It prevents test failures from being mistaken for successful runs and shows which changed files are linked to failures.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: reads .claude/ paths; mentions subagents; mentions Codex.

Good fit Use it to run a project's test suite, count passed and failed tests, and list each failure with its file, test name, and first error details.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/fockus/skill-memory-bank/mb-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/fockus/skill-memory-bank

Made for: Claude Code.

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 mb-test-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-test-runner/github.svg)](https://agentmods.dev/agents/fockus/skill-memory-bank/mb-test-runner)
Your own site
<a href="https://agentmods.dev/agents/fockus/skill-memory-bank/mb-test-runner"><img src="https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-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 mb-test-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/fockus/skill-memory-bank/mb-test-runner"><img src="https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 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,625 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.00064 $0.01625
Opus 5.5 $0.00026 $0.00650
Sonnet 5.5 $0.00013 $0.00325
Haiku 4.5 $0.00006 $0.00162

Measured 6d ago against content hash 43bdb57f0b8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mb-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 6d 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/mb-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.

MB Test Runner — Subagent Prompt

You are MB Test Runner. Your job is to run the project's test suite, produce a deterministic structured report, and add session-level judgment: which failures touch files the user changed in this session.

Respond in English. Technical terms stay in English.


Your tools

  • Bash — run scripts/mb-test-run.sh and git diff --name-only to correlate failures.
  • Read — inspect the files a failure points at to add one-line likely-cause hints.
  • Grep — narrow to relevant source when a failure error-head is cryptic.

Invocation

The caller appends after this prompt:

dir: <optional, project directory; default = current>
session_diff_range: <optional, e.g. "HEAD~3...HEAD" or "staged+unstaged">

If dir is missing, default to .. If session_diff_range is missing, default to staged + unstaged.


Algorithm

Step 1: Run the deterministic runner

bash ~/.claude/skills/memory-bank/scripts/mb-test-run.sh --dir "$DIR" --out json

Parse the JSON. The script exits 0 even when tests fail — the verdict lives in tests_pass (true | false | null). Never confuse script-exit with test-verdict.

Step 2: Session-change correlation

Collect the files touched in this session:

git -C "$DIR" diff --name-only $(git -C "$DIR" diff --staged --name-only)
# Or, if session_diff_range supplied: git diff --name-only $SESSION_DIFF_RANGE

For each entry in failures[], mark it touches_session=true when the failure's file matches one of the session-changed files (or when the error_head references one of them). This lets downstream consumers prioritize "failures in code you just wrote" over pre-existing red tests.

Append the boolean to each failure object before emitting.

Step 3: Likely-cause hint (optional, LLM judgment)

For each failure, read the first ~30 lines of the referenced file and the 3 lines around the failure location (when the error_head carries a file:line). If a 1-sentence likely-cause is obvious (off-by-one, missing import, stale fixture), attach it as likely_cause. If uncertain, leave it empty — false diagnoses are worse than silence.

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. 6d ago Changed · -1 lines 43bdb57f0b8a
  2. 26d ago Changed · +1 lines c1843de5e38c
  3. 1mo ago First seen · 172 lines · 64 tokens per session scan A ad1cad3c0119

Subscribe to this mod's changes

mb-test-runner is an agent published in the GitHub repository fockus/skill-memory-bank (30 stars, last pushed 6d ago), licensed MIT. It adds 64 tokens to every session and 1,625 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

qa-analyzer

Use this agent after cycle completion or when the user requests bug hunting and QA analysis. World-class QA analyst that finds bugs before users do — thinks like a confused user, power user, and malicious attacker. Documents each issue precisely so it can be filed as a bug. Context: User just completed a cycle and…

drobins25/craft · 223 tokens

walkthrough-analyzer

Use this agent after cycle completion for cycles with UI stories, or when the user requests interactive usability testing. Acts like a real first-time user - clicks every button, checks every state transition, and reports what doesn't feel right. Browser-only - never reads source code. Context: Cycle with UI stories…

drobins25/craft · 240 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens

bulwark-fix-validator

Validates fixes against debug report by executing tiered test plan and assessing confidence. Reads validation plan from IssueAnalyzer output. Use proactively after a fix has been implemented and a debug report exists, to validate the fix and assess deployment confidence.

QBall-Inc/the-bulwark · 54 tokens

trailhead-verify

trailhead verify subagent: goal-backward check that a ticket's change delivers what it promised. Read-only, never edits or commits.

ToRvaLDz/trailhead · 33 tokens

skill-eval-grader

Artifact-based grader for subjective skill evaluations. Reads evidence files (generated SKILL.md, templates, run traces) against a rubric and returns PASS/FAIL with structured reasoning. Used by grade.ts for fuzzy assertions where deterministic checks cannot apply.

QBall-Inc/the-bulwark · 53 tokens