dotnet-reportgenerator
Use the open-source free `ReportGenerator` tool for turning .NET coverage outputs into HTML, Markdown, Cobertura, badges, and merged reports. Use when raw coverage files are not readable enough for CI or human review.
Install
npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills/tree/main/skills/dotnet-reportgenerator
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install postpartum-genushyacinthus29-dotnet-skills@llmmart
git clone https://github.com/Postpartum-genushyacinthus29/dotnet-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole postpartum-genushyacinthus29/dotnet-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
ReportGenerator for .NET
Trigger On
- the repo uses or wants
ReportGenerator - CI needs human-readable coverage reports
- multiple coverage files must be merged
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- raw coverage collection with no reporting need
Inputs
- the nearest
AGENTS.md - existing coverage artifacts
- desired output formats
Quick Start
- Read the nearest
AGENTS.mdand confirm scope and constraints. - Run this skill's
Workflowthrough theRalph Loopuntil outcomes are acceptable. - Return the
Required Result Formatwith concrete artifacts and verification evidence.
Workflow
- Keep collection and rendering separate: Coverlet collects, ReportGenerator renders.
- Prefer the local or manifest-based .NET tool for reproducible CI runs.
- Choose output formats deliberately:
HtmlSummaryCoberturaMarkdownSummaryGithub- badges
- Merge multiple reports only when the repo really needs a consolidated view.
Bootstrap When Missing
If ReportGenerator is not configured yet:
- Detect current state:
rg --files -g '.config/dotnet-tools.json'dotnet tool list --localdotnet tool list --globalcommand -v reportgenerator
- Prefer local tool installation for reproducible CI:
dotnet new tool-manifest(if missing)dotnet tool install dotnet-reportgenerator-globaltool
- Add one explicit render command to
AGENTS.mdand CI, for example:dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"
- Run the report command once and return
status: configuredorstatus: improved. - If raw coverage outputs are already sufficient and no rendered artifacts are needed, return
status: not_applicable.
Deliver
- readable coverage artifacts for humans and CI systems
- explicit report-generation commands
Validate
- report inputs match the generated coverage format
- generated reports land in a stable artifact path
Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
- Execute one planned step and produce a concrete delta.
- Review the result and capture findings with actionable next fixes.
- Apply fixes in small batches and rerun the relevant checks or review steps.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable or only explicit exceptions remain.
- If a dependency is missing, bootstrap it or return
status: not_applicablewith explicit reason and fallback path.
Required Result Format
status:complete|clean|improved|configured|not_applicable|blockedplan: concise plan and current iteration stepactions_taken: concrete changes madevalidation_skills: final skills run, or skipped with reasonsverification: commands, checks, or review evidence summaryremaining: top unresolved items ornone
For setup-only requests with no execution, return status: configured and exact next commands.
Load References
references/reportgenerator.mdreferences/commands.mdreferences/formats.md
Example Requests
- "Render coverage as HTML in CI."
- "Merge multiple Coverlet reports."
Files (dotnet-skills)
-
references
-
commands.md 3.3 KB
# ReportGenerator CLI Commands ## Basic Syntax ```bash reportgenerator [options] ``` or when installed as a local tool: ```bash dotnet tool run reportgenerator [options] ``` or shorthand: ```bash dotnet reportgenerator [options] ``` ## Required Parameters | Parameter | Description | |-----------|-------------| | `-reports:<pattern>` | Coverage report file(s) or glob pattern. Separate multiple with semicolon. | | `-targetdir:<path>` | Output directory for generated reports. | ## Common Parameters | Parameter | Description | |-----------|-------------| | `-reporttypes:<types>` | Output format(s), semicolon-separated. Default: `Html`. | | `-sourcedirs:<paths>` | Source code directories for line coverage. | | `-historydir:<path>` | Directory for history tracking across runs. | | `-plugins:<paths>` | Custom plugin assemblies. | | `-assemblyfilters:<filters>` | Include/exclude assemblies. Prefix `-` to exclude, `+` to include. | | `-classfilters:<filters>` | Include/exclude classes by name. | | `-filefilters:<filters>` | Include/exclude files by path. | | `-verbosity:<level>` | Log level: `Off`, `Error`, `Warning`, `Info`, `Verbose`. | | `-title:<title>` | Title for the coverage report. | | `-tag:<tag>` | Build tag or version string shown in reports. | ## Example Commands ### Basic HTML Report ```bash reportgenerator \ -reports:"**/coverage.cobertura.xml" \ -targetdir:"artifacts/coverage" ``` ### Multiple Output Formats ```bash reportgenerator \ -reports:"**/coverage.cobertura.xml" \ -targetdir:"artifacts/coverage" \ -reporttypes:"Html;Cobertura;MarkdownSummaryGithub;Badges" ``` ### Merge Multiple Coverage Files ```bash reportgenerator \ -reports:"**/coverage.*.xml" \ -targetdir:"artifacts/coverage" \ -reporttypes:"Cobertura" ``` ### Filter Assemblies ```bash reportgenerator \ -reports:"coverage.xml" \ -targetdir:"coverage" \ -assemblyfilters:"+MyApp.*;-*.Tests" ``` ### With History Tracking ```bash reportgenerator \ -reports:"coverage.xml" \ -targetdir:"coverage" \ -historydir:"coverage/history" \ -reporttypes:"Html" ``` ### CI Pipeline with Badge Generation ```bash reportgenerator \ -reports:"**/coverage.cobertura.xml" \ -targetdir:"artifacts/coverage" \ -reporttypes:"HtmlSummary;Cobertura;Badges" \ -title:"MyProject Coverage" \ -tag:"$BUILD_NUMBER" ``` ### GitHub Actions Summary ```bash reportgenerator \ -reports:"**/coverage.cobertura.xml" \ -targetdir:"coverage" \ -reporttypes:"MarkdownSummaryGithub" cat coverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY ``` ## Filter Syntax Filters use prefix notation: - `+Pattern` - include items matching pattern - `-Pattern` - exclude items matching pattern Wildcards supported: - `*` matches any characters - Patterns are case-insensitive Example: ```bash -assemblyfilters:"+MyApp.*;+MyLib.*;-*.Tests;-*.TestUtilities" -classfilters:"+MyApp.Core.*;-*Generated*" -filefilters:"-*Designer.cs;-*AssemblyInfo.cs" ``` ## Environment Variables | Variable | Description | |----------|-------------| | `REPORTGENERATOR_LICENSE` | License key for PRO features. | ## Help ```bash reportgenerator --help reportgenerator -? ``` ## Sources - [ReportGenerator Usage](https://github.com/danielpalme/ReportGenerator#usage) - [ReportGenerator Wiki](https://github.com/danielpalme/ReportGenerator/wiki) -
formats.md 4.7 KB
# ReportGenerator Output Formats ## Format Categories ### Human-Readable Formats | Format | Description | Use Case | |--------|-------------|----------| | `Html` | Full interactive HTML report with file browser. | Local development, detailed review. | | `HtmlSummary` | Single-page HTML summary. | CI artifacts, quick overview. | | `HtmlChart` | HTML with coverage trend charts. | Historical tracking dashboards. | | `HtmlInline` | HTML with embedded CSS/JS (no external files). | Email-friendly, standalone sharing. | | `HtmlInline_AzurePipelines` | Inline HTML styled for Azure DevOps. | Azure Pipelines reports tab. | | `HtmlInline_AzurePipelines_Dark` | Dark-themed Azure DevOps HTML. | Azure Pipelines with dark mode. | ### Markdown Formats | Format | Description | Use Case | |--------|-------------|----------| | `MarkdownSummary` | Basic Markdown table summary. | Wiki pages, general Markdown consumers. | | `MarkdownSummaryGithub` | GitHub-flavored Markdown summary. | GitHub Actions step summaries, PR comments. | | `MarkdownDeltaSummary` | Markdown showing coverage delta. | PR reviews comparing coverage changes. | ### Machine-Readable Formats | Format | Description | Use Case | |--------|-------------|----------| | `Cobertura` | Cobertura XML format. | CI tools, code quality gates, merging. | | `OpenCover` | OpenCover XML format. | Tools expecting OpenCover input. | | `Clover` | Atlassian Clover XML format. | Bamboo, Bitbucket integrations. | | `Lcov` | lcov tracefile format. | Tools using lcov ecosystem. | | `JsonSummary` | JSON summary of metrics. | Custom tooling, dashboards. | | `SonarQube` | SonarQube generic coverage format. | SonarQube/SonarCloud integration. | | `TeamCitySummary` | TeamCity service messages. | TeamCity build statistics. | ### Badge Formats | Format | Description | Use Case | |--------|-------------|----------| | `Badges` | SVG coverage badges. | README files, shields.io style. | | `PngChart` | PNG coverage trend chart. | Documentation, static hosting. | | `SvgChart` | SVG coverage trend chart. | Scalable documentation images. | ### Text Formats | Format | Description | Use Case | |--------|-------------|----------| | `TextSummary` | Plain text summary. | Console output, logs. | | `TextDeltaSummary` | Plain text delta summary. | CI logs comparing coverage. | | `CsvSummary` | CSV summary data. | Spreadsheet analysis. | | `Latex` | LaTeX document format. | Academic papers, PDF generation. | | `LatexSummary` | LaTeX summary table. | Academic paper appendices. | | `Xml` | Custom XML format. | Custom XML consumers. | | `XmlSummary` | XML summary data. | Lightweight XML parsing. | ## Common Format Combinations ### CI Pipeline (GitHub Actions) ```bash -reporttypes:"HtmlSummary;Cobertura;MarkdownSummaryGithub;Badges" ``` Produces: - `Summary.html` - Quick HTML overview for artifact download - `Cobertura.xml` - Machine-readable for quality gates - `SummaryGithub.md` - Append to `$GITHUB_STEP_SUMMARY` - `badge_*.svg` - Coverage badges for README ### CI Pipeline (Azure DevOps) ```bash -reporttypes:"HtmlInline_AzurePipelines;Cobertura" ``` ### Local Development ```bash -reporttypes:"Html" ``` Opens full interactive report with file-level detail. ### PR Review ```bash -reporttypes:"MarkdownDeltaSummary;Cobertura" ``` Shows what changed and maintains machine-readable format. ### Merging Reports Only ```bash -reporttypes:"Cobertura" ``` When the only goal is to merge multiple coverage files into one. ## Output File Names Each format produces specific output files in the target directory: | Format | Output File(s) | |--------|----------------| | `Html` | `index.html` + supporting files | | `HtmlSummary` | `Summary.html` | | `Cobertura` | `Cobertura.xml` | | `MarkdownSummaryGithub` | `SummaryGithub.md` | | `Badges` | `badge_linecoverage.svg`, `badge_branchcoverage.svg`, `badge_methodcoverage.svg` | | `JsonSummary` | `Summary.json` | | `TextSummary` | `Summary.txt` | | `Lcov` | `lcov.info` | ## Badge Examples Generated badges display coverage percentages: - Line coverage: `badge_linecoverage.svg` - Branch coverage: `badge_branchcoverage.svg` - Method coverage: `badge_methodcoverage.svg` Usage in README: ```markdown `badge_linecoverage.svg` ``` Or link to raw file URL in GitHub: ```markdown  ``` ## PRO-Only Formats Some formats require a PRO license: - `MHtml` - Single-file MHTML archive - Risk hotspot analysis features in HTML reports The core formats listed above are free under Apache 2.0. ## Sources - [ReportGenerator Output Formats](https://github.com/danielpalme/ReportGenerator#output-formats) - [ReportGenerator Wiki](https://github.com/danielpalme/ReportGenerator/wiki) -
reportgenerator.md 1.2 KB
# ReportGenerator ## Open/Free Status - open source - free to use under Apache 2.0 - optional paid PRO features exist, but the core tool is free ## Install Global tool: ```bash dotnet tool install -g dotnet-reportgenerator-globaltool ``` Local tool: ```bash dotnet new tool-manifest dotnet tool install dotnet-reportgenerator-globaltool ``` ## Verify First Before installing, check whether the repo already has a local tool manifest or an existing global install: ```bash rg --files -g '.config/dotnet-tools.json' dotnet tool list --local dotnet tool list --global command -v reportgenerator ``` ## Common Usage ```bash reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura" dotnet reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"MarkdownSummaryGithub" ``` ## CI Fit - generate reports into a stable artifact directory - use one or more machine-readable formats alongside HTML if the pipeline consumes them ## When Not To Use - when raw coverage files are enough and no human-readable output is required ## Sources - [ReportGenerator](https://github.com/danielpalme/ReportGenerator)
-
-
SKILL.md 4.1 KB
--- name: dotnet-reportgenerator version: "1.0.0" category: "Testing" description: "Use the open-source free `ReportGenerator` tool for turning .NET coverage outputs into HTML, Markdown, Cobertura, badges, and merged reports. Use when raw coverage files are not readable enough for CI or human review." compatibility: "Requires coverage artifacts such as Cobertura, OpenCover, or lcov; respects the repo's `AGENTS.md` commands first." --- # ReportGenerator for .NET ## Trigger On - the repo uses or wants `ReportGenerator` - CI needs human-readable coverage reports - multiple coverage files must be merged ## Value - produce a concrete project delta: code, docs, config, tests, CI, or review artifact - reduce ambiguity through explicit planning, verification, and final validation skills - leave reusable project context so future tasks are faster and safer ## Do Not Use For - raw coverage collection with no reporting need ## Inputs - the nearest `AGENTS.md` - existing coverage artifacts - desired output formats ## Quick Start 1. Read the nearest `AGENTS.md` and confirm scope and constraints. 2. Run this skill's `Workflow` through the `Ralph Loop` until outcomes are acceptable. 3. Return the `Required Result Format` with concrete artifacts and verification evidence. ## Workflow 1. Keep collection and rendering separate: Coverlet collects, ReportGenerator renders. 2. Prefer the local or manifest-based .NET tool for reproducible CI runs. 3. Choose output formats deliberately: - `HtmlSummary` - `Cobertura` - `MarkdownSummaryGithub` - badges 4. Merge multiple reports only when the repo really needs a consolidated view. ## Bootstrap When Missing If `ReportGenerator` is not configured yet: 1. Detect current state: - `rg --files -g '.config/dotnet-tools.json'` - `dotnet tool list --local` - `dotnet tool list --global` - `command -v reportgenerator` 2. Prefer local tool installation for reproducible CI: - `dotnet new tool-manifest` (if missing) - `dotnet tool install dotnet-reportgenerator-globaltool` 3. Add one explicit render command to `AGENTS.md` and CI, for example: - `dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"` 4. Run the report command once and return `status: configured` or `status: improved`. 5. If raw coverage outputs are already sufficient and no rendered artifacts are needed, return `status: not_applicable`. ## Deliver - readable coverage artifacts for humans and CI systems - explicit report-generation commands ## Validate - report inputs match the generated coverage format - generated reports land in a stable artifact path ## Ralph Loop Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work. 1. Plan first (mandatory): - analyze current state - define target outcome, constraints, and risks - write a detailed execution plan - list final validation skills to run at the end, with order and reason 2. Execute one planned step and produce a concrete delta. 3. Review the result and capture findings with actionable next fixes. 4. Apply fixes in small batches and rerun the relevant checks or review steps. 5. Update the plan after each iteration. 6. Repeat until outcomes are acceptable or only explicit exceptions remain. 7. If a dependency is missing, bootstrap it or return `status: not_applicable` with explicit reason and fallback path. ### Required Result Format - `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked` - `plan`: concise plan and current iteration step - `actions_taken`: concrete changes made - `validation_skills`: final skills run, or skipped with reasons - `verification`: commands, checks, or review evidence summary - `remaining`: top unresolved items or `none` For setup-only requests with no execution, return `status: configured` and exact next commands. ## Load References - `references/reportgenerator.md` - `references/commands.md` - `references/formats.md` ## Example Requests - "Render coverage as HTML in CI." - "Merge multiple Coverlet reports."
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.