Borrowing it
Nothing to install: this file belongs to sourjya/kiro-rails. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sourjya/kiro-rails/main/.claude/commands/review-test-quality.mdgit clone --depth 1 https://github.com/sourjya/kiro-railsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/sourjya/kiro-rails/review-test-quality)<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-test-quality"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-test-quality/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-test-quality"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-test-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.02052 |
| Opus 5 | $0.00014 | $0.01026 |
| Sonnet 5 | $0.00006 | $0.00410 |
| Haiku 4.5 | $0.00003 | $0.00205 |
Grade A, and why
review-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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Before scanning, read docs/testing/ and docs/decisions/ if they exist. Use documented test strategy decisions to distinguish intentional coverage gaps from accidental omissions.
Act as a principal-level software engineer and test architect performing a comprehensive test quality audit.
Your mission is not to count tests. It is to determine whether the test suite would actually catch regressions, prevent defects, and remain maintainable as the codebase grows. A test that runs green but verifies nothing is worse than no test at all.
Activation Triggers
Run this review when:
- A feature is complete and test coverage is claimed
- At sprint end to assess overall test health
- When flaky tests are reported or test suite runtime is growing
- Before merging a large feature branch
- After a production incident to verify regression coverage
Classification Lenses
Apply these four lenses when classifying findings. They are not scoring dimensions - they are frames for understanding why a gap matters.
- Risk lens: Is this gap in a high-business-impact area (auth, payments, data mutation, job processing)? Effort should be proportional to quality risk, not line count.
- Breadth lens: Does the suite cover both technology-facing tests (unit, integration) and business-facing tests (contract, E2E, acceptance)? Flag where an entire quadrant is missing.
- Portfolio lens: Is the pyramid inverted? Too many E2E tests and no unit coverage is brittle and expensive. Too many unit tests with no integration coverage is blind to real system behavior.
- Isolation lens: Classify gaps by test size - small (single process, no I/O), medium (cross-tier, controlled dependencies), large (full stack, real services). Flag where size and intent are mismatched.
Review Objectives
Identify:
- Assertion quality. Tests that make no meaningful assertions, assert trivially true conditions, or assert implementation details instead of behavior. Flag tests where removing the production code would still pass the test.
- Over-mocking. Tests that mock so many dependencies that the test no longer exercises any real logic. Flag when a mock is standing in for the thing actually being tested.
- Under-isolation. Tests that rely on external state, filesystem, network, or database without intent - causing flakiness, ordering sensitivity, or environment coupling.
- Test data hygiene. Hardcoded magic values, shared mutable fixtures, or test data that encodes business rules in the test rather than deriving them from the system under test.
- Coverage gaps on critical paths. Untested public interfaces, business-critical flows (auth, payments, data mutations, job processing), and service boundary contracts. Flag whether gaps are isolated or systemic per layer.
- Flakiness patterns. Inspect for the following root causes: order dependency between tests, async wait assumptions (
sleep, arbitrary timeouts), shared mutable state, non-hermetic test data, time or randomness dependencies, and network or filesystem side effects. Reruns that mask flakes are mitigation, not a fix - flag them. - Test structure and readability. Missing or misleading test names, tests that verify multiple unrelated behaviors in one case, and tests where the failure message gives no useful diagnostic information.
- Repeated setup and teardown. Copy-pasted fixture construction, repeated mock configuration, and missing test factories or builders that would eliminate duplication.
- Test type imbalance. Overreliance on a single layer. Flag where the portfolio is inverted or missing a tier entirely. Apply the portfolio lens: many fast low-level tests, fewer broad integration tests, minimal E2E only where behavior cannot be verified otherwise.
- Contract and boundary testing. Missing tests at service boundaries, API contracts, event schemas, and external integrations. Flag where a third-party interface change would go undetected.
- Test coupling to implementation. Tests that break when internal refactoring occurs without behavior change, indicating tests are coupled to structure rather than intent.
- Dead or disabled tests. Skipped, commented-out, or
xtest/xittests without explanation. Flag whether these represent known failures, deferred work, or forgotten cleanup. - Missing negative and edge case coverage. Tests that only cover the happy path. For every critical input-handling path, check: invalid input, boundary values (min, max, off-by-one), empty/null/zero states, concurrent access, and error propagation. Apply boundary-value and equivalence-partitioning thinking: are representative values from each input class tested?
- Changed code without tests. For any recently added or modified module, service, Lambda handler, or public interface - flag whether corresponding tests exist or were updated. A gap here is a direct regression risk.
- CI orchestration gaps. Flag: coverage reports not published as CI artifacts, test results not exported in a parseable format (e.g. JUnit XML), no matrix coverage for OS or runtime versions where relevant, flaky-test reruns configured without underlying fixes, and missing fail-fast or concurrency cancellation settings that cause slow or misleading CI feedback.
- AI-generated test artifacts. Tests with verbose boilerplate that restates the test name, mock configurations that mirror the production code structure exactly, and test suites that were clearly generated in bulk without knowledge of actual system behavior.
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.
- 12d ago First seen · 158 lines · 28 tokens per session scan A 33d7b2c953c6
review-test-quality is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 2,052 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.
Other commands, from other repositories
prototype
You are building a proof-of-concept for the current Grainulator sprint. Read CLAUDE.md for sprint context and claims.json for existing research claims.
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
verify
Run repository verification using the verification-loop skill.
test-coverage
Analyze test coverage and identify the highest-value gaps to fill.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.
check-dev
Type-check a Z specification with fuzz.