test-coverage

test-coverage is a command for Claude Code from kumaran-is/claude-code-onboarding. It costs 0 tokens per session (1,010 once invoked), scanned A, original, MIT.

A command that detects supported project stacks and creates a test-coverage report, showing files below the required coverage threshold.

In plain words
What is it for?
Use it to run coverage for Spring Boot, Python/FastAPI, and NestJS projects and find the weakest-covered files.
Why use it?
It reveals which parts of the code have too few tests and highlights important gaps such as authentication, cryptography, and payment logic.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; positional $N argument.

Good fit Use it to run coverage for Spring Boot, Python/FastAPI, and NestJS projects and find the weakest-covered files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kumaran-is/claude-code-onboarding/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/kumaran-is/claude-code-onboarding

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/test-coverage.svg)](https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/test-coverage)
Your own site
<a href="https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/test-coverage"><img src="https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/test-coverage.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,010 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.00000 $0.01010
Opus 5 $0.00000 $0.00505
Sonnet 5 $0.00000 $0.00202
Haiku 4.5 $0.00000 $0.00101

Measured 4d ago against content hash 3c6c44ed232c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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 4d 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/commands/test-coverage.md · 108 lines

How it starts

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

/test-coverage — Multi-Stack Test Coverage Report

Detect which stacks are present and run coverage for each. Lists files below 80% threshold sorted worst-first.

Minimum threshold: 80% coverage. 100% required for auth, crypto, payment logic.

Stack Detection + Coverage Commands

Spring Boot (Java 21 / Maven)

Detected by: pom.xml containing spring-boot

./mvnw test jacoco:report -q
# Report: target/site/jacoco/index.html
# Console summary:
./mvnw jacoco:report -q && cat target/site/jacoco/jacoco.csv | \
  awk -F',' 'NR>1 {missed=$4+$6; total=missed+$5+$7; if(total>0) pct=int((total-missed)*100/total); else pct=0; print pct"% "$2"/"$3}' | \
  sort -n | head -20

Python / FastAPI (Python 3.14)

Detected by: pyproject.toml or requirements.txt containing fastapi

pytest --cov=src --cov-report=term-missing --cov-fail-under=80 -q 2>&1 | \
  grep -E "(FAIL|PASS|ERROR|%)" | head -30
# Files below threshold:
pytest --cov=src --cov-report=term-missing -q 2>&1 | \
  awk '/^TOTAL/{next} /[0-9]+%/{if(int($4)<80) print $4" "$1}' | sort -n

NestJS (Node.js / TypeScript)

Detected by: package.json containing @nestjs/core

npm run test:cov -- --silent 2>&1 | tail -40
# Files below threshold (vitest):
npm run test:cov -- --silent 2>&1 | \
  awk '/^\|/{gsub(/\|/,""); if($2+0 < 80) print $2"% "$1}' | sort -n

Flutter (Dart 3.10.9)

Detected by: pubspec.yaml containing flutter:

flutter test --coverage -q 2>&1 | tail -20
# Generate LCOV report:
genhtml coverage/lcov.info -o coverage/html --quiet
# Files below threshold:
lcov --summary coverage/lcov.info 2>&1 | grep -E "lines|functions"

Output Format

## Test Coverage Report — {date}

### Spring Boot API
✅ Overall: 84% (threshold: 80%)

Files below 80%:
| File | Coverage | Missing Lines |
|------|----------|---------------|
| UserService.java | 67% | 45-52, 78-80 |
| AuthFilter.java  | 71% | 12-15 |

### Python API
❌ Overall: 71% (threshold: 80%) — BELOW THRESHOLD

Files below 80% (sorted worst-first):
| File | Coverage | Missing Lines |
|------|----------|---------------|
| payment_service.py | 45% | 23-67, 89-102 |
| user_repository.py | 62% | 34-45 |

### NestJS API
✅ Overall: 88% (threshold: 80%)
(No files below threshold)

### Flutter App
✅ Overall: 82% (threshold: 80%)

## Summary
- Stacks checked: 4
- Passing (≥80%): 3
- Failing (<80%): 1 (Python API)
- Critical files below 100%: [list any auth/crypto/payment files not at 100%]

## Suggested Next Steps
Generate missing tests for worst-coverage files:
1. payment_service.py (45%) — add tests for lines 23-67 (payment processing logic)
2. user_repository.py (62%) — add tests for lines 34-45 (error paths)

Read the full file on GitHub · 108 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. 4d ago First seen · 108 lines · 0 tokens per session scan A 3c6c44ed232c

Subscribe to this mod's changes

test-coverage is a command published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,010 tokens. 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.