coverage

coverage is a command for Claude Code from L3DigitalNet/Claude-Code-Plugins. It costs 37 tokens per session (1,144 once invoked), scanned A, original, MIT.

A Qt project command that measures which parts of the program's code are exercised by tests, then creates an HTML report showing the results.

In plain words
What is it for?
Run coverage checks for Python or C++ Qt projects, set a coverage threshold, exclude selected files or patterns, and review the generated HTML report.
Why use it?
It reveals untested code paths so you can see where tests are missing. It can also pass those gaps to a test-generation agent.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the qt-suite plugin — 6 commands, 6 agents shipped together

Good fit Run coverage checks for Python or C++ Qt projects, set a coverage threshold, exclude selected files or patterns, and review the generated HTML report.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add L3DigitalNet/Claude-Code-Plugins
Claude Code
/plugin install qt-suite

Made for: Claude Code.

Or install qt-suite, the plugin that ships this one along with the rest of its 6 commands, 6 agents.

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 coverage

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/l3digitalnet/claude-code-plugins/coverage"><img src="https://agentmods.dev/badge/commands/l3digitalnet/claude-code-plugins/coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 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,144 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.00037 $0.01144
Opus 5.5 $0.00015 $0.00458
Sonnet 5.5 $0.00007 $0.00229
Haiku 4.5 $0.00004 $0.00114

Measured 1mo ago against content hash 3620eae445de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

plugins/qt-suite/commands/coverage.md · 160 lines

How it starts

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

/qt-suite:coverage — Coverage Analysis

Run coverage instrumentation, generate an HTML report, and identify untested code paths. Optionally triggers the test-generator agent when gaps are found.

Step 1: Parse Arguments and Config

Parse the command argument for flags:

  • --python — force Python mode
  • --cpp — force C++ mode
  • --threshold N — override coverage threshold (default 80)

Read .qt-test.json if present:

  • project_type — python | cpp
  • coverage_threshold — numeric, default 80
  • build_dir — default "build-coverage"
  • coverage_exclude — list of patterns to exclude

Auto-detect project type if not specified (CMakeLists.txt = C++, pyproject.toml = Python).

Step 2: Run Coverage — Python

First verify the prerequisite tools are available:

python3 -c "import coverage, pytest_cov" 2>&1 || echo "Install: pip install coverage pytest-cov"

Run tests with coverage instrumentation:

QT_QPA_PLATFORM=offscreen \
  pytest \
    --cov=<package_name> \
    --cov-branch \
    --cov-report=term-missing \
    --cov-report=html:htmlcov \
    --cov-report=json:.coverage.json \
    tests/

Determine <package_name> from pyproject.toml [tool.coverage.run] source field, or from the project's main package directory.

Step 3: Run Coverage — C++

First verify prerequisites:

bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-prerequisites.sh"

Build with coverage instrumentation:

echo "Configuring with coverage instrumentation..."
cmake -B build-coverage -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
echo "Building..."
cmake --build build-coverage --parallel 4

Collect coverage:

cd build-coverage
echo "Running tests (pass 1 — zeroing counters)..."
ctest --output-on-failure

lcov --zerocounters --directory .
# (re-run tests to collect fresh counters)
echo "Running tests (pass 2 — collecting coverage data)..."
ctest --output-on-failure

echo "Generating coverage report..."
lcov --capture \
     --directory . \
     --output-file ../coverage_raw.info \
     --no-external

lcov --remove ../coverage_raw.info \
     '*/tests/*' '*/moc_*' '*/ui_*' \
     --output-file ../coverage.info

genhtml ../coverage.info \
        --output-directory ../htmlcov \
        --title "Coverage Report" \
        --legend
cd ..

Read the full file on GitHub · 160 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. 1mo ago First seen · 160 lines · 37 tokens per session scan A 3620eae445de

Subscribe to this mod's changes

coverage is a command published in the GitHub repository L3DigitalNet/Claude-Code-Plugins (8 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,144 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-08-31.