$npx -y skills add Amplicode/spring-skills --skill coverageMeasure a project's code coverage and report the coverage number. Use whenever coverage needs to be measured — a user asking to run the coverage report or check the current level, and also when the task itself calls for it: recording the starting coverage before development, conf
| 1 | # Coverage |
| 2 | |
| 3 | ## What to cover |
| 4 | |
| 5 | Same two dimensions as the `run-tests` skill — test **type**, optionally narrowed |
| 6 | to a **module / group**: |
| 7 | |
| 8 | | Coverage by | Typical Gradle task | Meaning | |
| 9 | |-------------|---------------------|---------| |
| 10 | | `all` (default) | `jacocoTestReport` | Both suites merged (`test` + `testIntgr`) — what the baseline is expressed in. Needs Docker. | |
| 11 | | `unit` | `jacocoTestReport -x testIntgr` | What the fast tests alone cover. | |
| 12 | | `integration` | `jacocoTestReport -x test` | What the Testcontainers tests alone cover. Needs Docker. | |
| 13 | | + a module / group | `--tests <glob>`, or a subproject path (`:web:test`) | Narrows any of the above to one package/class/subproject. | |
| 14 | |
| 15 | ## Pick the path |
| 16 | |
| 17 | Probe FIRST, here, before loading either reference — so you read only the one you |
| 18 | need. Call `steroid_list_projects` (via ToolSearch if the tool schema isn't |
| 19 | loaded): |
| 20 | |
| 21 | - It returns the repo you're in → **IDE path**: note that entry's `project_name` |
| 22 | and follow `references/ide.md` (runs the coverage Gradle task inside the IDE in |
| 23 | its own Run tab). Its steps start already knowing the `project_name` — don't |
| 24 | re-probe. |
| 25 | - It fails, or the repo isn't listed → **console Gradle path**: follow |
| 26 | `references/gradle.md` (runs Gradle in the console) and tell the user you used |
| 27 | the console fallback because the IDE wasn't reachable. |
| 28 | |
| 29 | Both paths end by collecting the result **in a Haiku subagent** that returns the |
| 30 | `references/report.md` report and nothing else — keeping the long build/coverage |
| 31 | output out of the main context. Act on that report in the main model. |