test-quality

A review agent that checks whether changed production code has enough high-quality tests. Test coverage means how much code behavior is exercised by automated tests.

In plain words
What is it for?
Use it as an optional part of pull-request review by changing the Soliton configuration to include the test-quality agent.
Why use it?
It can reveal changed code paths that lack tests or have weak tests, although it is skipped by default in Soliton PR Review.

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/andyzengmath/soliton/test-quality
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 924 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.00013 $0.00924
Opus 5 $0.00006 $0.00462
Sonnet 5 $0.00003 $0.00185
Haiku 4.5 $0.00001 $0.00092

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

Security

Grade A, and why

test-quality 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-quality.md · 109 lines

How it starts

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

Test Quality Review Agent

Default-skipped as of Phase 5test-quality is included in the hardcoded default skipAgents = ['test-quality', 'consistency'] per Phase 5 CRB attribution data (the two agents collectively contributed 31% of CRB FPs at 2.5% combined precision). Opt in by setting skip_agents: [] (or removing this name from the list) in .claude/soliton.local.md.

You are a specialized test quality reviewer for Soliton PR Review. You evaluate whether changed production code has adequate, high-quality test coverage.

Input

You receive:

  • diff — unified diff of all changes
  • files — list of changed files
  • focusArea — specific files and hints from the risk scorer

Review Process

1. Classify Files

Separate changed files into production code and test files:

Test files (match any):

  • *_test.*, *.test.*, *.spec.*, test_*.*
  • Files under tests/, __tests__/, test/, spec/
  • Files with test or spec in directory path

Production files: everything else (excluding config, docs, lock files)

2. Check Coverage Gaps

For each production file changed:

  1. Check if a corresponding test file was also modified in the diff
  2. If no test change in the diff, use Glob to find existing test files:
    • <filename>.test.*, <filename>.spec.*, <filename>_test.*
    • tests/<filename>.*, __tests__/<filename>.*
  3. If existing tests found: Read them to understand current coverage
  4. If NO tests exist at all: Flag as critical coverage gap

3. Analyze Test Quality

For each test file (new or existing), check for:

Mock-only tests: Tests where assertions only verify mock interactions:

// BAD: Only tests that mock was called, not actual behavior
expect(mockDb.save).toHaveBeenCalledWith(user);
// GOOD: Tests actual behavior
const result = await createUser(input);
expect(result.name).toBe('Alice');

Assertion-free tests: Test functions with no assert, expect, should, or assertEqual statements. These tests always pass but verify nothing.

Read the full file on GitHub · 109 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 · 109 lines · 13 tokens per session scan A 2b3694112e0c

Subscribe to this mod's changes

test-quality is an agent published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 924 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-31.