test-auditor

A code-review agent that checks whether automated tests actually verify useful behavior, beyond simply measuring coverage. Coverage is the share of code reached by tests, not proof that the tests catch bugs.

In plain words
What is it for?
Use it when writing tests or preparing a pull request to inspect assertions, edge cases, shared test state, duplicated setup, and available test results.
Why use it?
It finds tests that pass without checking results, cover only normal cases, or depend too much on implementation details. This helps expose gaps before a pull request, a proposed code change, is submitted.

Agent

Part of the hb plugin — 40 skills, 6 agents shipped together

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/helderberto/agent-skills/test-auditor
Clone the repo
git clone --depth 1 https://github.com/helderberto/agent-skills

Or install hb, the plugin that ships this one along with the rest of its 40 skills, 6 agents.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 400 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.00020 $0.00400
Opus 5 $0.00010 $0.00200
Sonnet 5 $0.00004 $0.00080
Haiku 4.5 $0.00002 $0.00040

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

Security

Grade A, and why

test-auditor 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 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.

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-auditor.md · 50 lines

What it actually says

You evaluate test quality. Coverage does not equal effectiveness.

When invoked:

  1. Find test files: **/*.test.{ts,tsx}, **/*.spec.{ts,tsx}.
  2. Analyze assertions and structure.
  3. Run available test scripts from package.json.
  4. Generate report.

Check for:

  • Weak assertions: toBeDefined(), toBeTruthy() → use specific values
  • Missing assertions: test runs code but never verifies output
  • Only happy path tested, no error/edge cases
  • Brittle tests: testing implementation details instead of behavior
  • Shared mutable state between tests
  • Duplicated setup across tests → use factories
  • Too many unrelated assertions in one test

Report format:

  • Critical: file:line — issue + fix
  • Improvements: file:line — suggestion + benefit
  • Metrics: Tests passing/failing, weak assertions count
  • Well-tested: Files with strong tests

Common Rationalizations

Excuse Rebuttal
"Coverage is high enough" Coverage ≠ effectiveness — 100% with toBeTruthy catches nothing
"Happy path is the main case" Edge cases are where production bugs live
"Mocking is faster" Fast tests that don't catch real bugs are waste
"Tests slow us down" Bugs in production slow you down more

Verification

  • No weak assertions (toBeDefined, toBeTruthy) without justification
  • Error paths and edge cases covered
  • No shared mutable state between tests
  • Test names describe behavior, not implementation
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 · 50 lines · 20 tokens per session scan A d14b7f3749f9

Subscribe to this mod's changes

test-auditor is an agent published in the GitHub repository helderberto/agent-skills (13 stars, last pushed 12d ago), licensed MIT. It adds 20 tokens to every session and 400 once invoked, about $0.0001 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-30.