coverage

Solid

Improve code coverage up to a target percentage. Measures current Go and JS coverage, identifies low-coverage packages/files, writes tests, and iterates until the target is reached.

AI & Automation 67 stars 9 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Coverage Improve code coverage to a target percentage by identifying untested code and writing tests iteratively. ## Argument parsing Parse `$ARGUMENTS`: - **Target** (required): A number like `80` or `80%`. This is the coverage target. - **Language filter** (optional): `go`, `js`, or omitted for both. - **Scope filter** (optional): Package paths or file globs to restrict which packages/files to improve. If omitted, improve all packages. Examples: - `/coverage 80` — both Go and JS to 80% - `/coverage 90 go` — Go only to 90% - `/coverage 75 js` — JS only to 75% - `/coverage 85 go internal/runner/` — Go, only the runner package ## Step 0: Measure baseline coverage ### Go (if not filtered to JS-only) Run coverage and capture the per-package breakdown: ```bash go test ./... -coverprofile=coverage.out -count=1 2>&1 || true ``` Then parse the profile to get per-package percentages: ```bash go tool cover -func=coverage.out ``` Record: - **Overall coverage** (the `total:` line) - **Per-package coverage** as a sorted list (lowest first) If a scope filter was given, restrict attention to matching packages. ### JS (if not filtered to Go-only) ```bash cd ui && npx --yes vitest@2 run --coverage --coverage.reporter=text 2>&1 || true ``` Record: - **Overall coverage** from the summary line - **Per-file coverage** sorted lowest first If a scope filter was given, restrict attention to matching files. Report the baseline to the user: - Overall Go coverage: X% - Overall JS ...

Details

Author
changkun
Repository
changkun/wallfacer
Created
3 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category