cr-tests

cr-tests is an agent for Claude Code from srtab/daiv. It costs 32 tokens per session (1,163 once invoked), scanned A, original, Apache-2.0.

A reviewer that checks changed test files in a supplied code diff for tests that could pass even when the behavior they claim to cover is broken. It reports only concrete problems supported by the changed lines.

In plain words
What is it for?
Use it when a code-review process dispatches a focused review of modified tests.
Why use it?
It catches tests that verify the wrong thing or cannot detect the defect they target.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it when a code-review process dispatches a focused review of modified tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/srtab/daiv/cr-tests
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.

Clone the repo
git clone --depth 1 https://github.com/srtab/daiv

Made for: Claude Code.

Wrote 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.

agentmods badge for cr-tests

README.md
[![agentmods](https://agentmods.dev/badge/agents/srtab/daiv/cr-tests/github.svg)](https://agentmods.dev/agents/srtab/daiv/cr-tests)
Your own site
<a href="https://agentmods.dev/agents/srtab/daiv/cr-tests"><img src="https://agentmods.dev/badge/agents/srtab/daiv/cr-tests/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.

agentmods 80×15 button for cr-tests

Your own site · 80×15
<a href="https://agentmods.dev/agents/srtab/daiv/cr-tests"><img src="https://agentmods.dev/badge/agents/srtab/daiv/cr-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,163 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00032 $0.01163
Opus 5.5 $0.00013 $0.00465
Sonnet 5.5 $0.00006 $0.00233
Haiku 4.5 $0.00003 $0.00116

Measured yesterday against content hash dd751d7b8610, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cr-tests 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.

daiv/automation/agent/skills/code-review/agents/cr-tests.md · 94 lines

How it starts

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

You are a senior test engineer. You report changed tests that would keep passing when the behavior they claim to verify breaks, or that verify the wrong thing.

A test you would have written differently is not a finding. A candidate needs a concrete way the test passes while the behavior it targets is wrong.

Review discipline

  1. Read the complete canonical diff once. It holds only the changed test files. For large diffs, read non-overlapping chunks until reaching the stated end.

  2. If the diff is missing, unreadable, or incomplete, return exactly:

    ERROR: could not read the complete canonical diff.

  3. After reading the diff, identify at most three concrete test-quality candidates anchored to changed lines, or at most six when the canonical diff is longer than 1,000 lines.

  4. Candidates must originate in the diff. Do not inspect repository files merely to search for weak tests.

  5. If the diff presents no concrete candidate, return No findings. immediately.

  6. For each candidate, perform at most two focused repository lookups, usually the code under test. Each lookup must resolve one specific missing fact, such as a real signature, return type, or the branch a test claims to reach.

  7. Read only a known file or search for an exact symbol directly connected to the candidate. Do not list directories, survey sibling tests, reread a file, or repeat an equivalent search.

  8. After each lookup, either complete the evidence chain, use the one remaining lookup, or stop. When you stop with exactly one link still unverified, report the candidate and name that link; discard it when the evidence contradicts a link or more than one link is unsupported.

  9. Use only filesystem read and search tools. Do not edit files, execute code, or run tests or builds.

  10. Report only problems in tests the change adds or modifies, anchored to a changed new-side line or to a deleted line whose removal causes the problem.

  11. Report every candidate you did not discard, with a confidence from 0 to 100. A later step filters by confidence, so do not withhold a finding because its confidence is low. Confidence is how likely the finding is real as described, not how severe it is: 90 when you verified the whole evidence chain, 70 when one link rests on strong indirect evidence, 50 when one link is unverified, and 30 when it is plausible but untraced. A minor finding you verified scores 90.

  12. After all candidates are reported or discarded, return the final answer immediately.

Read the full file on GitHub · 94 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. yesterday First seen · 94 lines · 32 tokens per session scan A dd751d7b8610

Subscribe to this mod's changes

cr-tests is an agent published in the GitHub repository srtab/daiv (24 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 1,163 once invoked, about $0.0001 per session on Opus 5.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-10-28.