ccc-test-coverage

ccc-test-coverage is a command for Claude Code from KevinZai/commander. It costs 47 tokens per session (947 once invoked), scanned A, a copy of test-coverage, MIT.

A tool that checks which parts of your code are covered by tests and finds gaps. It can generate tests for uncovered functions, branches, errors, and edge cases.

In plain words
What is it for?
Use it to measure coverage and add tests in projects using Jest, Vitest, pytest, Rust, Java, Go, or similar frameworks.
Why use it?
It shows where tests are missing so you can reduce the risk of untested code.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

Good fit Use it to measure coverage and add tests in projects using Jest, Vitest, pytest, Rust, Java, Go, or similar frameworks.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-test-coverage
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/KevinZai/commander

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 ccc-test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-test-coverage/github.svg)](https://agentmods.dev/commands/kevinzai/commander/ccc-test-coverage)
Your own site
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-test-coverage"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-test-coverage/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 ccc-test-coverage

Your own site · 80×15
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-test-coverage"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-test-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 947 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 97% copy Near-identical to another mod 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.00047 $0.00947
Opus 5.5 $0.00019 $0.00379
Sonnet 5.5 $0.00009 $0.00189
Haiku 4.5 $0.00005 $0.00095

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

Security

Grade A, and why

ccc-test-coverage 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 6d 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

This is a copy

97% identical to test-coverage — 105 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/ccc-test-coverage.md · 79 lines

How it starts

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

/ccc-test-coverage — close the coverage gaps

CC Commander · /ccc-test-coverage · runs the real coverage tool, writes tests for the gaps worst-first, and reports before/after numbers.

Arguments

$ARGUMENTS optionally narrows the scope to a path or glob (for example src/services). Empty means the whole project.

What happens

  1. Detect the framework and coverage command. Use the first match:

    Indicator Coverage command
    vitest.config.* npx vitest run --coverage
    jest.config.* or a jest key in package.json npx jest --coverage --coverageReporters=json-summary
    pytest.ini / pyproject.toml with pytest pytest --cov=src --cov-report=json
    Cargo.toml cargo llvm-cov --json
    pom.xml with JaCoCo mvn test jacoco:report
    go.mod go test -coverprofile=coverage.out ./... then go tool cover -func=coverage.out

    Read the threshold from project config (coverageThreshold, --cov-fail-under, JaCoCo rules, CI config). Use 80% only when the project sets none. If no coverage tool is configured, ask before installing one (picker below).

  2. Record the baseline. Run the coverage command, parse the JSON summary or terminal output, and list files below the threshold, worst first. For each, identify:

    • untested functions or methods;
    • missed branches (if/else, switch cases, ternaries, error and catch paths);
    • dead code that inflates the denominator (report it; do not delete it without asking).
  3. Write the missing tests, file by file, in this order:

    1. happy path with valid input;
    2. error handling: invalid input, missing data, failed network or I/O;
    3. edge cases: empty arrays, null or undefined, boundary values such as 0, -1 and the maximum;
    4. each remaining branch.

    Rules for every test:

    • place it where the project keeps tests (foo.ts → foo.test.ts by default);
    • copy the project's import style, assertion library and mocking approach;
    • mock only external dependencies (database, APIs, file system, clock);
    • keep tests independent, with no shared mutable state;
    • name tests by behavior, for example create_user_with_duplicate_email_returns_409.

Read the full file on GitHub · 79 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. 6d ago Changed · +5 lines · +30 tokens per session c037c0dba4c3
  2. 1mo ago First seen · 74 lines · 17 tokens per session scan A 057e7b28f1f6

Subscribe to this mod's changes

ccc-test-coverage is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 947 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to test-coverage, differing in 105 lines, and is treated as a copy.