coverage-report

coverage-report is a command for Claude Code from thapaliyabikendra/ai-artifacts. It costs 11 tokens per session (1,022 once invoked), scanned A, original, Apache-2.0.

A command that examines how much of a C# codebase is covered by tests and writes a report about missing coverage. Test coverage describes which files and methods have automated tests.

In plain words
What is it for?
It is for finding source and test files, matching tests to services and other code, counting tested methods, and producing coverage metrics and recommendations.
Why use it?
It shows where important code has no unit or integration tests, so testing work can be directed at specific gaps.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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/thapaliyabikendra/ai-artifacts/coverage-report
Clone the repo
git clone --depth 1 https://github.com/thapaliyabikendra/ai-artifacts

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/coverage-report.svg)](https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/coverage-report)
Your own site
<a href="https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/coverage-report"><img src="https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/coverage-report.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 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,022 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.1 $0.00011 $0.01022
Opus 5 $0.00005 $0.00511
Sonnet 5 $0.00002 $0.00204
Haiku 4.5 $0.00001 $0.00102

Measured 6d ago against content hash 1a7a1e27b1cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

.claude/commands/qa/coverage-report.md · 151 lines

How it starts

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

Generate Coverage Report

Analyze test coverage for: $ARGUMENTS.scope $ARGUMENTS.module

Instructions

Step 1: Analyze Codebase Structure

  1. Find all source files:

    api/src/**/*.cs (exclude Migrations, obj, bin)
    
  2. Categorize by type:

    • Entities: **/Entities/*.cs
    • AppServices: **/*AppService.cs
    • Domain Services: **/Services/*.cs
    • Validators: **/*Validator.cs
    • Repositories: **/Repositories/*.cs

Step 2: Find Existing Tests

  1. Locate test files:

    api/test/**/*Tests.cs
    api/test/**/*Test.cs
    
  2. Map tests to source:

    • By naming convention: PatientAppServiceTests -> PatientAppService
    • By imports/usings

Step 3: Calculate Coverage

For each source file, determine:

  • Has unit tests: Yes/No
  • Has integration tests: Yes/No
  • Test count: Number of test methods
  • Methods tested: Count vs total public methods

Step 4: Generate Report

# Test Coverage Report

**Generated**: [DateTime]
**Scope**: [scope]
**Module**: [module if applicable]

## Executive Summary

| Metric | Value | Target | Status |
|--------|-------|--------|--------|
| Files with tests | X/Y (Z%) | >80% | :white_check_mark:/:x: |
| AppServices tested | X/Y (Z%) | 100% | :white_check_mark:/:x: |
| Validators tested | X/Y (Z%) | 100% | :white_check_mark:/:x: |
| Domain services tested | X/Y (Z%) | >90% | :white_check_mark:/:x: |

## Coverage by Layer

### Domain Layer
| File | Has Tests | Test Count | Coverage |
|------|-----------|------------|----------|
| Patient.cs | :white_check_mark: | 5 | Good |
| Doctor.cs | :x: | 0 | **GAP** |

### Application Layer
| AppService | Has Tests | Methods | Tested | Coverage |
|------------|-----------|---------|--------|----------|
| PatientAppService | :white_check_mark: | 5 | 4 | 80% |
| DoctorAppService | :x: | 4 | 0 | **0%** |

### Validators
| Validator | Has Tests | Rules | Tested |
|-----------|-----------|-------|--------|
| CreatePatientValidator | :white_check_mark: | 5 | 5 |
| UpdatePatientValidator | :x: | 3 | 0 |

## Critical Gaps (Priority 1)

These require immediate attention:

| Type | File | Reason |
|------|------|--------|
| AppService | DoctorAppService.cs | No tests, has CRUD operations |
| Validator | UpdatePatientValidator.cs | Validation untested |

## Suggested Tests

### DoctorAppService (0% coverage)

```csharp
public class DoctorAppServiceTests : ApplicationTestBase
{
    [Fact]
    public async Task GetListAsync_ReturnsPagedResult() { }

Read the full file on GitHub · 151 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 First seen · 151 lines · 11 tokens per session scan A 1a7a1e27b1cb

Subscribe to this mod's changes

coverage-report is a command published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,022 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-30.