Go cover
Generate Go test coverage report with package breakdown.From its SKILL.md
npx -y skills add otaviof/gosmith --skill go-coverAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.2 KB, as published. Nobody here has run it
Instructions
-
Validate: Check
go.modexists in cwd or parent dirs -
Execute:
- Pattern:
<ARG>or default./... --html: Generatecoverage.htmland report path- Run:
go test -coverprofile=coverage.out -covermode=atomic <pattern>
- Pattern:
-
Parse: Extract per-package coverage from
coverage.out- Skip mode/total lines
- Group by package path
- Calculate percentage: (covered statements / total statements) × 100
-
Format:
## COVERAGE REPORT | Package | Coverage | Target | Status | |----------------|----------|--------|--------| | pkg/domain | 87.2% | 80% | PASS | | pkg/service | 72.1% | 80% | FAIL | **Overall:** 83.4% | **Target:** 80% | **Status:** PASS -
Report:
- Standard: Markdown table with overall status
- HTML mode: "Coverage report:
coverage.html"
-
Edge cases:
- No tests: "No test files found in
<pattern>" - Build failure: Report compilation errors (first 5 lines)
- Target: Env
GO_COVER_TARGETor default 80%
- No tests: "No test files found in