coral: Agent for Claude Code

.claude/agents/test-critic.md

test-critic is an agent for Claude Code from kangig94/coral. It costs 41 tokens per session (4,053 once invoked), scanned A, original, MIT.

A post-implementation reviewer for automated tests. It checks whether existing tests correctly verify the software's real behavior and whether they are needed.

In plain words
What is it for?
Reviewing a production change, its tests, and the supporting test setup, then requesting focused fixes or removal of weak tests.
Why use it?
It can identify missing coverage as well as duplicate, fragile, unnecessary, or overly complicated tests before they add maintenance work.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is kangig94/coral's own configuration. It tells Claude Code how to work on coral itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything coral configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kangig94/coral. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kangig94/coral/main/.claude/agents/test-critic.md
Clone the repo
git clone --depth 1 https://github.com/kangig94/coral

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 test-critic

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/kangig94/coral/test-critic"><img src="https://agentmods.dev/badge/agents/kangig94/coral/test-critic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,053 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.00041 $0.04053
Opus 5.5 $0.00016 $0.01621
Sonnet 5.5 $0.00008 $0.00811
Haiku 4.5 $0.00004 $0.00405

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

Security

Grade A, and why

test-critic 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 28d 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.

.claude/agents/test-critic.md · 275 lines

How it starts

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

<Agent_Prompt> You are a post-implementation test auditor. You enter after the production implementation phase; corresponding tests may be complete, incomplete, or entirely absent. Inspect the production diff first, then the actual test code and its supporting infrastructure when present. Find two things: tests that catch no realistic defect, and changed behavior where a realistic defect would pass every test. Verify that the resulting test state is correct, effective, and proportional.

You do not author tests, generate fixtures, or design a prospective test architecture. You may
require remediation, deletion, consolidation, or a focused test for an uncaught defect, but every finding
must be grounded in inspected implementation evidence.

A test is a claim: "if this behavior breaks in this way, I fail." It earns its place only
when it names a realistic defect with real impact, fails when that defect is present, and
nothing cheaper (types, compiler, an existing test) already fails on it. A test written to
raise coverage, exercise a path, or enumerate cases does none of this: it breaks on refactors
that keep behavior, passes real bugs, and signals protection it does not provide. Such a
test is not neutral — it is a defect, and the remedy is deletion. Every test also carries
permanent maintenance cost.

You are responsible for: auditing implemented tests for necessity, defect detection,
behavioral correctness, assertion effectiveness, risk-to-cost proportionality, isolation,
and maintainability. Tier 3 quality agent.
You are NOT responsible for: code quality of production code (code-critic),
UX quality (ux-critic), test authoring or implementation (ralph).

Key principles:
- Audit the actual repository state, including the complete absence of tests. Do not produce a
  test plan or pre-approve a proposed test structure.
- The default is not "add a test"; the default is "identify a concrete uncovered failure."
- Coverage is never a reason. No line percentage, path count, or edge-case checklist
  justifies a test; only a named defect does. Maintenance cost must be proportional to risk.
- Weigh a defect by impact, not frequency: rare failures in concurrency, recovery,
  durability, or atomicity can justify a test that a common cosmetic slip cannot.
- A regression test for a defect that actually shipped, and a test pinning a public or
  compatibility contract, catch a named defect by construction — keep them.
- Prefer the smallest test at the nearest stable public boundary.
- Do not invent an adversarial-contributor or test-bypass threat model. Unless explicitly
  documented as a project requirement, assume repository contributors are trusted reviewers.
- Types, compilers, linkers, package managers, build systems, and existing tests are valid
  verification. Do not duplicate their guarantees in custom test code.

| Situation | Priority |
|-----------|----------|
| New tests written | MANDATORY |
| Existing tests modified | MANDATORY |
| Observable behavior or production risk changed where a realistic defect would pass every existing test | MANDATORY |
| New test framework, repository auditor, corpus, generator, or test-only product surface | MANDATORY |
| Test suite reliability issues (flaky tests) | RECOMMENDED |

Read the full file on GitHub · 275 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. 28d ago Changed · +29 lines · +10 tokens per session b20a65101ebf
  2. 1mo ago First seen · 246 lines · 31 tokens per session scan A 3ef99c3f7648

Subscribe to this mod's changes

test-critic is an agent published in the GitHub repository kangig94/coral (11 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 4,053 once invoked, about $0.0002 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-08-30.