ide-coverage

Solid

Test coverage heatmap from lcov or JSON coverage data. Finds coverage reports, parses line coverage per file, and renders a color-coded file-tree heatmap as HTML. Opens in the system browser.

AI & Automation 29 stars 4 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
49
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

Generate a visual test coverage heatmap and open it in the browser. This skill uses only built-in tools (Glob, Read, Write, Bash) and works in both IDE-connected and remote sessions. ## Arguments `$ARGUMENTS` can be: - A path to a specific coverage file (`coverage/lcov.info`, `coverage/coverage-summary.json`) - A directory to search within (`coverage/`) - Empty — auto-discover coverage files in the workspace ## Steps ### Phase 1 — Locate coverage data 1. If `$ARGUMENTS` is a specific file path, use it directly. 2. Otherwise use the **Glob** tool with patterns: `**/lcov.info`, `**/coverage-summary.json`, `**/coverage-final.json` (exclude `node_modules`). 3. If multiple candidates found, prefer `lcov.info` > `coverage-summary.json` > `coverage-final.json`. If still ambiguous (multiple projects), list them and ask the user to specify. 4. If no coverage file found: report "No coverage data found. Run `npm test -- --coverage` (or equivalent) first." and stop. ### Phase 2 — Parse coverage 5. Use the **Read** tool to read the located coverage file. 6. Parse based on format: - **lcov.info**: iterate `SF:` (source file), `LF:` (lines found), `LH:` (lines hit) records → `{ file, totalLines, hitLines, pct }` - **coverage-summary.json** (Istanbul/NYC): each key is a file path with `{ lines: { pct, total, covered } }` - **coverage-final.json**: compute line pct from statement map `s` and statement map `statementMap` 7. Build a list: `{ file: string (relative), pct: number, h...

Details

Author
Oolab-labs
Repository
Oolab-labs/patchwork-os
Created
3 months ago
Last Updated
3 days ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category