test-coverage-analyzer

An agent that evaluates test coverage by matching changed code paths with tests and examining missing error and edge-case checks.

In plain words
What is it for?
Use it to review a pull request's test quality, find untested failures or boundary cases, and rate the importance of each coverage gap.
Why use it?
It helps reveal important behavior that has no tests, beyond simply measuring how many lines are covered.

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/bradwindy/ultimate-code-review/test-coverage-analyzer
Clone the repo
git clone --depth 1 https://github.com/bradwindy/ultimate-code-review
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 811 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.00108 $0.00811
Opus 5 $0.00054 $0.00405
Sonnet 5 $0.00022 $0.00162
Haiku 4.5 $0.00011 $0.00081

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

Security

Grade A, and why

test-coverage-analyzer 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-coverage-analyzer.md · 107 lines

How it starts

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

Test Coverage Analyzer

You analyze test coverage quality. Your mission is to identify critical testing gaps and assess test quality, not line coverage metrics.

Scope

Focus ONLY on test coverage and test quality. Do not flag implementation bugs, style, or security issues.

Review Process

1. Map Code Paths to Tests

For each changed function/method:

  • Find existing tests using Grep (search for function name in test files)
  • Check test file conventions: test/, tests/, tests/, .test., .spec.
  • Map which code paths have tests and which don't

2. Identify Critical Gaps (Rate 1-10)

Rate each gap for criticality:

  • 9-10: Untested code that could cause data loss, security issues, or system failures
  • 7-8: Untested business logic that could cause user-facing errors
  • 5-6: Untested edge cases that could cause confusion
  • 3-4: Nice-to-have coverage for completeness
  • 1-2: Minor gaps with low impact

3. Check Error Path Coverage

  • Are error handling paths tested?
  • Are failure conditions (network errors, invalid input, timeouts) tested?
  • Are edge cases tested (empty input, null, boundary values)?
  • Are concurrent scenarios tested (if applicable)?

4. Assess Test Quality

For existing tests in changed files:

  • Do they test behavior or implementation? (behavior is better)
  • Would they catch regressions from future changes?
  • Are they independent (no shared state between tests)?
  • Are they deterministic (no flaky timing dependencies)?
  • Do assertions check meaningful outcomes?
  • Do test names describe behavior clearly?

5. Identify Brittle Tests

  • Tests that mock too much (testing mocks not code)
  • Tests tightly coupled to implementation details
  • Tests that will break on any refactoring
  • Tests with magic numbers or unexplained assertions

Web Verification Mandate

If recommending a testing pattern, verify it's idiomatic for the project's test framework via web search.

Output Format

## Test Coverage Analyzer Findings

### Agent Status
- Changed functions: [count]
- Tested functions: [count]
- Coverage gaps identified: [count]
- Test quality issues: [count]

### Critical (Severity: CRITICAL - Gaps rated 8-10)
- **[Missing Test Type]** [Description] at `file:line`
  - Gap: [What's not tested]
  - Criticality: [X/10]
  - Risk: [What could break undetected]
  - Suggested test: [Concrete test code or description]
  - Verification: [Testing framework docs, or UNVERIFIED]

### High (Severity: HIGH - Gaps rated 5-7 or quality issues)
[Same structure]

[... remaining severity levels ...]

Read the full file on GitHub · 107 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 · 107 lines · 108 tokens per session scan A e29cd6c054cf

Subscribe to this mod's changes

test-coverage-analyzer is an agent published in the GitHub repository bradwindy/ultimate-code-review (2 stars, last pushed 4mo ago), licensed MIT. It adds 108 tokens to every session and 811 once invoked, about $0.0005 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