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.
npx agentmods add commands/rosudrag/ai-praxis/test-coveragegit clone --depth 1 https://github.com/rosudrag/ai-praxisWrote 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.
[](https://agentmods.dev/commands/rosudrag/ai-praxis/test-coverage)<a href="https://agentmods.dev/commands/rosudrag/ai-praxis/test-coverage"><img src="https://agentmods.dev/badge/commands/rosudrag/ai-praxis/test-coverage.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00831 |
| Opus 5 | $0.00000 | $0.00415 |
| Sonnet 5 | $0.00000 | $0.00166 |
| Haiku 4.5 | $0.00000 | $0.00083 |
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.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/test-coverage - Coverage Gap Analysis and Test Generation
Analyze code coverage, identify gaps, and generate tests to reach target thresholds.
Instructions
You are a test coverage specialist. Systematically close coverage gaps by generating targeted tests in priority order.
Step 1: Detect Framework and Run Coverage
Auto-detect the project's test framework and coverage tool:
| Stack | Coverage Command |
|---|---|
| JS/TS (Jest) | npx jest --coverage |
| JS/TS (Vitest) | npx vitest run --coverage |
| JS/TS (c8) | npx c8 npm test |
| Python | pytest --cov={{source_dir}} --cov-report=term-missing |
| Go | go test -coverprofile=coverage.out ./... |
| C# | dotnet test --collect:"XPlat Code Coverage" |
| Java (Maven) | mvn test jacoco:report |
If {{coverage_command}} is configured, use that instead of auto-detection.
Run the coverage tool and parse the output.
Step 2: Identify Under-Covered Files
Set the target threshold (default: 80%, configurable by the user).
From the coverage report, list every file below the threshold. Sort by:
- Financial/security/auth code first (these require 100% coverage)
- Lowest coverage percentage
- Most uncovered lines
For each file, identify the specific uncovered lines and branches.
Step 3: Generate Tests by Priority
For each under-covered file, generate tests in this order:
Priority 1 - Happy path: Core functionality, main success scenarios Priority 2 - Error handling: Exception paths, failure modes, invalid input Priority 3 - Edge cases: Boundaries, null/empty values, off-by-one, overflow Priority 4 - Branch coverage: Untested conditional branches, switch cases, guard clauses
Place tests alongside existing test files. Match the project's test naming conventions.
Step 4: Verify and Iterate
After generating tests for a file:
- Run {{test_command}} to confirm new tests pass
- Re-run coverage analysis for that file
- If still below threshold, generate more tests (next priority tier)
- Move to the next file when threshold is met
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.
- 4d ago First seen · 99 lines · 0 tokens per session scan A 5104ca843858
test-coverage is a command published in the GitHub repository rosudrag/ai-praxis (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 831 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-08-31.
Other commands, from other repositories
write-tests
Generate comprehensive test coverage for existing code.
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
kill-mutants
Analyze surviving mutants from a mutation testing run and write targeted unit tests to kill them. Re-runs mutations to confirm kills.
test
Generate comprehensive tests.
unit-test
Write / run the unit tests for the feature. (AIDLC Unit Test phase) Usage: /unit-test.
test
Execute a comprehensive test run for the following target.