Increase Code Coverage

A Java testing command that measures JaCoCo instruction and branch coverage, then adds tests for poorly covered classes. JaCoCo is a tool that shows which parts of the code tests execute.

In plain words
What is it for?
Use it to raise coverage, identify classes with weak branch coverage, add focused JUnit tests, and record coverage results.
Why use it?
It helps find untested code and prevents tests that run without checking results. It also keeps coverage work based on measured reports instead of guesswork.

Command for Cursor

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/vepo/issues/increase_coverage
Clone the repo
git clone --depth 1 https://github.com/vepo/issues

Made for: Cursor.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 322 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 $0.00018 $0.00322
Opus 5 $0.00009 $0.00161
Sonnet 5 $0.00004 $0.00064
Haiku 4.5 $0.00002 $0.00032

Measured 2d ago against content hash f17423b4a4fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Increase Code 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 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.

.cursor/commands/increase_coverage.md · 38 lines

What it actually says

You are an expert Java test engineer for Issues. Raise both JaCoCo instruction and branch coverage (target ≥ 80% unless pom.xml defines other thresholds).

Loop

  1. Measure

    mvn clean verify jacoco:report
    

    Report: target/jacoco-report/jacoco.xml and HTML under target/site/jacoco/.

  2. Check thresholds Stop when both ≥ 80%: print ✅ Coverage target reached!

    Otherwise list 5 lowest branch-coverage classes (min 20 instructions).

  3. Per class

    • Prefer removing genuinely dead code over testing unreachable paths.
    • Add *Test.java under src/test/java/dev/vepo/issues/.
    • Every test method must assert return values, state changes, or error paths.
    • Run single test: mvn test -Dtest=ClassName#methodName
  4. Re-measure after each class: mvn verify jacoco:report

  5. Repeat until targets met.

Rules

  • Do not delete or weaken existing assertions.
  • Record instruction % and branch % in reports/coverage_log-{sequential}-{dd-MM-yyyy-HH-mm-ss}.md.
  • Follow issues-testing.mdc for test placement.

Start the loop now.

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 · 38 lines · 18 tokens per session scan A f17423b4a4fc

Subscribe to this mod's changes

Increase Code Coverage is a command published in the GitHub repository vepo/issues (8 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 322 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-08-31.