Skip to content
Back to skills

Review Test Quality

ASecurity

Reviews a test suite or diff for weak assertions, over-mocking, hidden coupling, sleeps, nondeterminism and tests that cannot fail, with a concrete rewrite for each problem. Use when reviewing tests.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsgotesting

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill review-test-quality --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review Test Quality?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Review Test Quality
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-review-test-quality/badge)](https://www.skillsdirectory.com/skills/hermes-hq-review-test-quality)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: review-test-quality
description: Reviews a test suite or diff for weak assertions, over-mocking, hidden coupling, sleeps, nondeterminism and tests that cannot fail, with a concrete rewrite for each problem. Use when reviewing tests.
license: CC0-1.0
arguments:
  - tests
  - code_under_test
  - framework
argument-hint: <tests> [code_under_test] [framework]
disable-model-invocation: true
metadata:
  version: 1.0.0
  kind: prompt
  category: testing
  source: https://hermes-ide.com/prompts/review-test-quality
  catalog: 2026.1014.1
---

# Review test quality

## Inputs

- `tests` (required): The tests to review, as a diff or files.
- `code_under_test` (optional): The production code the tests exercise. Needed to judge what a test should catch.
- `framework` (optional): Test framework and language, if not obvious (for example Jest, pytest, JUnit 5, Go testing).

Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.

<context>
A test earns its maintenance cost only if it fails when the behaviour it covers breaks and passes otherwise. Many tests do neither: they assert that a result is "not null", verify that a mock was called with whatever the mock returned, pass because an async assertion never ran, break when an internal method is renamed, depend on the order the suite runs in, or sleep and hope. Coverage numbers do not reveal any of this. The quickest way to judge a test is to ask which plausible bug in the code under test it would catch.
</context>

<task>
Review these testsOnly if framework was provided:  ($framework):

<tests>
$tests
</tests>
Only if code_under_test was provided: 

<code_under_test>
$code_under_test
</code_under_test>

1. For each test, state in one line the behaviour it claims to check, judged from its name and body.
2. Look for tests that cannot fail: no assertion; assertions inside callbacks, loops or branches that may never run; un-awaited promises or async assertions; exceptions swallowed by `try`/`catch`; expected values computed with the same logic as the code; and comparisons of a mock's return value with itself.
3. Look for weak assertions: checking only existence, type, length or "truthy"; large snapshots nobody reads; asserting a subset when the whole result matters; and error tests that accept any exception instead of the specific one.
4. Look for over-mocking: mocking the unit under test or its pure collaborators, mocking types the project does not own instead of wrapping them, asserting call sequences instead of outcomes, and mocks whose behaviour differs from the real dependency (say how).
5. Look for hidden coupling: shared mutable fixtures, order dependence, global state, tests of private methods or internal structure, and one test covering several behaviours so a failure does not say what broke.
6. Look for nondeterminism: sleeps and fixed timeouts, real clocks and time zones, randomness without a seed, network or file-system dependence, unordered collections compared as ordered, concurrency without synchronisation, and locale-dependent formatting.
7. Mutation check: for the most important tests, name two or three small, realistic bugs in the code under test (an off-by-one, a flipped condition, a missing null check, a dropped field) and say whether each test would catch them. If the code under test was not provided, say what you infer and mark it as an inference.
8. Rewrite each problem test in the same framework and style, keeping its intent, so that it fails for the bug it should catch.

If the tests are fine, say so plainly and do not invent problems.
</task>

<constraints>
- Every finding cites the test name and line, the smell, the concrete bug it lets through or the false failure it causes, and the fix.
- Do not comment on naming or formatting unless it hides what is tested.
- Rewrites stay in the project's framework, helpers and conventions; no new test libraries unless one is clearly needed, and then say why.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
</constraints>

<output_format>
## Verdict
One line: solid | usable with fixes | gives false confidence. Then the main reason.

## Findings
Numbered, most harmful first. Each: `test name:line` - smell - what it lets through or breaks on - fix.

## Bugs these tests would miss
Table: plausible bug | caught? | by which test, or which test should catch it.

## Rewrites
Code blocks with the corrected tests, one per finding that needs code.
</output_format>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.