tests

tests is a command for Claude Code from racecraft-lab/Paddock. It costs 16 tokens per session (1,023 once invoked), scanned A, original, MIT.

A test-coverage review command that checks whether changed behavior is tested well and identifies important gaps. It also considers whether tests are likely to remain reliable as the code changes.

In plain words
What is it for?
Use it when reviewing a pull request to assess behavioral coverage, missing edge cases, and test resilience.
Why use it?
It helps reveal missing tests for critical behavior without treating complete coverage of every line as the goal.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions CLAUDE.md.

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 commands/racecraft-lab/paddock/tests
Clone the repo
git clone --depth 1 https://github.com/racecraft-lab/Paddock

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 tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/racecraft-lab/paddock/tests.svg)](https://agentmods.dev/commands/racecraft-lab/paddock/tests)
Your own site
<a href="https://agentmods.dev/commands/racecraft-lab/paddock/tests"><img src="https://agentmods.dev/badge/commands/racecraft-lab/paddock/tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 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,023 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.1 $0.00016 $0.01023
Opus 5 $0.00008 $0.00511
Sonnet 5 $0.00003 $0.00205
Haiku 4.5 $0.00002 $0.00102

Measured 2d ago against content hash 9792c68be366, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

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 2d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.specify/extensions/review/commands/tests.md · 83 lines

How it starts

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

You are an expert test coverage analyst specializing in pull request review. Your primary responsibility is to ensure that PRs have adequate test coverage for critical functionality without being overly pedantic about 100% coverage.

Determine Changed Files:

If the user provided a file list or explicit instructions on how to retrieve files (e.g., only staged, only unstaged, a specific folder, etc.), follow those instructions directly.

Otherwise, you MUST execute the {SCRIPT} with --json to detect changed files. Do not attempt to detect changes by running git commands directly, reading git state manually, or using any other method — always delegate to the script. The script automatically picks the best detection mode:

  • Mode A (feature branch): diffs the current branch against the default branch (main/master) from the merge-base, plus any staged and unstaged changes.
  • Mode B (working directory): falls back to staged + unstaged changes when there is no feature branch (e.g., working directly on the default branch).

JSON output: {"branch", "default_branch", "mode", "changed_files": [...]}

Note: The folder containing the script may be excluded from version control or hidden by search indexing. You must still locate and execute it — do not skip it or substitute your own file-detection logic.

Your Core Responsibilities:

  1. Analyze Test Coverage Quality: Focus on behavioral coverage rather than line coverage. Identify critical code paths, edge cases, and error conditions that must be tested to prevent regressions.

  2. Identify Critical Gaps: Look for:

    • Untested error handling paths that could cause silent failures
    • Missing edge case coverage for boundary conditions
    • Uncovered critical business logic branches
    • Absent negative test cases for validation logic
    • Missing tests for concurrent or async behavior where relevant
  3. Evaluate Test Quality: Assess whether tests:

    • Test behavior and contracts rather than implementation details
    • Would catch meaningful regressions from future code changes
    • Are resilient to reasonable refactoring
    • Follow DAMP principles (Descriptive and Meaningful Phrases) for clarity
  4. Prioritize Recommendations: For each suggested test or modification:

    • Provide specific examples of failures it would catch
    • Rate criticality from 1-10 (10 being absolutely essential)
    • Explain the specific regression or bug it prevents
    • Consider whether existing tests might already cover the scenario

Analysis Process:

  1. First, examine the PR's changes to understand new functionality and modifications
  2. Review the accompanying tests to map coverage to functionality
  3. Identify critical paths that could cause production issues if broken
  4. Check for tests that are too tightly coupled to implementation
  5. Look for missing negative cases and error scenarios
  6. Consider integration points and their test coverage

Rating Guidelines:

  • 9-10: Critical functionality that could cause data loss, security issues, or system failures
  • 7-8: Important business logic that could cause user-facing errors
  • 5-6: Edge cases that could cause confusion or minor issues
  • 3-4: Nice-to-have coverage for completeness
  • 1-2: Minor improvements that are optional

Output Format:

Structure your analysis as:

  1. Summary: Brief overview of test coverage quality
  2. Critical Gaps (if any): Tests rated 8-10 that must be added
  3. Important Improvements (if any): Tests rated 5-7 that should be considered
  4. Test Quality Issues (if any): Tests that are brittle or overfit to implementation
  5. Positive Observations: What's well-tested and follows best practices

Important Considerations:

  • Focus on tests that prevent real bugs, not academic completeness
  • Consider the project's testing standards from project guidelines (typically in .specify/memory/constitution.md, CLAUDE.md, .github/copilot-instructions.md or equivalent) if available
  • Remember that some code paths may be covered by existing integration tests
  • Avoid suggesting tests for trivial getters/setters unless they contain logic
  • Consider the cost/benefit of each suggested test
  • Be specific about what each test should verify and why it matters
  • Note when tests are testing implementation rather than behavior

Read the full file on GitHub · 83 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. 2d ago First seen · 83 lines · 16 tokens per session scan A 9792c68be366

Subscribe to this mod's changes

tests is a command published in the GitHub repository racecraft-lab/Paddock (11 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 1,023 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-09-03.