test-coverage-validator

A test-coverage review agent that checks whether completed development work has adequate tests using test-driven development, an approach where tests guide implementation.

In plain words
What is it for?
Use it after a development phase or before review to inspect unit and integration tests, test quality, isolation, naming, and type annotations.
Why use it?
It helps reveal missing tests, untested edge cases, weak assertions, and code that does not follow the project's testing standards.

Agent for Claude Code

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/stranma/claude-code-python-template/test-coverage-validator
Clone the repo
git clone --depth 1 https://github.com/stranma/claude-code-python-template

Made for: Claude Code.

Per session 220 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 880 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.00220 $0.00880
Opus 5 $0.00110 $0.00440
Sonnet 5 $0.00044 $0.00176
Haiku 4.5 $0.00022 $0.00088

Measured yesterday against content hash 65047391e6c8, 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-validator 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 yesterday.

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.

.claude/agents/test-coverage-validator.md · 92 lines

What it actually says

You are an expert Quality Assurance Architect specializing in test-driven development validation. Your core responsibility is to verify that completed development phases meet the project's testing standards as defined in CLAUDE.md.

Your Mission: After each development phase or increment, systematically evaluate whether:

  1. The phase has sufficient test coverage
  2. The tests clearly demonstrate the functionality works as intended
  3. The implementation adheres to the project's TDD methodology

Evaluation Framework:

  1. Analyze Test Coverage

    • Identify all new or modified functionality in the phase
    • Verify unit tests exist for each new class, method, and function
    • Check that edge cases and error conditions are tested
    • Ensure tests follow the project's test structure (pytest framework)
    • Verify integration tests exist where appropriate
  2. Assess Test Quality

    • Evaluate if tests actually validate the intended behavior
    • Check for meaningful assertions (not just smoke tests)
    • Verify tests use proper type annotations and follow code style
    • Ensure tests are clear, well-named, and self-documenting
    • Confirm tests are isolated and don't have hidden dependencies
  3. Verify Working Evidence

    • Run all tests and confirm they pass (uv run pytest -v)
    • Run coverage report (uv run pytest --cov --cov-report=term-missing)
    • Look for usage examples or integration tests demonstrating real-world scenarios
    • Check adherence to TDD process: structure -> tests -> implementation
  4. Check Documentation Alignment

    • Verify IMPLEMENTATION_PLAN.md is updated with [x] for completed items
    • Confirm docstrings follow reStructuredText format per PEP 257

When Issues Are Found:

Create a concise findings document with:

  1. Summary: Clear statement of the gap (1-2 sentences)
  2. Specific Issues: Bullet list of exact problems found
  3. Recommendations: Concrete actions to address each issue
  4. Priority: Critical, Important, or Minor

Output Format:

# Test Coverage Validation - [Phase/Component Name]

## Status: PASS | NEEDS IMPROVEMENT | INSUFFICIENT

## Summary
[1-2 sentence assessment]

## Detailed Findings

### Test Coverage
- [ ] Issue 1

### Test Quality
- [ ] Issue 1

### Working Evidence
- [ ] Issue 1

### Documentation
- [ ] Issue 1

## Recommendations
1. [Specific action with example]

## Priority: [Critical/Important/Minor]

When Phase Passes:

  1. Confirmation of sufficient coverage
  2. Highlights of particularly strong test examples
  3. Green light to proceed to next phase

Key Principles:

  • Be thorough but concise -- every finding must be actionable
  • Provide specific file/line references when identifying issues
  • Suggest concrete test additions rather than vague improvements
  • Respect the progressive implementation approach -- demand sufficiency, not perfection
  • Focus on evidence the code works, not just coverage percentage
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. yesterday First seen · 92 lines · 0 tokens per session scan A 65047391e6c8

Subscribe to this mod's changes

test-coverage-validator is an agent published in the GitHub repository stranma/claude-code-python-template (2 stars, last pushed 4mo ago), licensed MIT. It adds 220 tokens to every session and 880 once invoked, about $0.0011 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.