/leonardomso-skills:coverage-matrixfrom leonardomso-skills
Coverage matrix — map a feature's scenarios to the tests that prove them. Use when asked what a feature's tests cover or miss, to plan the tests a feature needs, or what a diff (branch or PR) leaves untested.
Ships in leonardomso-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce a coverage matrix for one feature: its scenario space as rows, each row marked with the tests that prove it. When the feature has no tests yet, the same matrix is its test plan. Asked for several features, run the steps once per feature. Asked about a diff (a branch or PR), follow DIFF.md, which reuses these steps.
Pin down the feature's boundary: its entry points (routes, handlers, components, public functions, jobs), the code they reach, and the test files that exercise them, each tagged with its layer (unit, integration, e2e). Read the code itself: branches, guards, early returns, throws, and config/flag checks are where scenarios hide.
If the boundary is ambiguous ("checkout" could mean cart, payment, or both), ask the user one question before going further.
Done when every entry point and every test file in scope is listed, each test file with its layer.
A dimension is one axis the feature's behaviour varies along. Partition each into equivalence classes: values the code treats the same way. Use DIMENSIONS.md as the checklist of axes to hunt for.
Every class traces to a source: a branch, a validation rule, a state check (cite file:line), or a requirement from a spec or issue. A requirement with no code behind it is still a class; its scenarios are unimplemented.
Done when every conditional in the scoped code is explained by some dimension class.
A scenario is one combination of classes with one expected outcome. Generate them in this order:
Keep unreachable combinations as N/A rows with the reason, so the reader sees they were considered. Give each scenario an ID (AUTH-01, AUTH-02, …); an ID names one scenario forever.
Done when every class appears in at least one scenario and every interacting pair has one.
Read every test in scope and record the scenario(s) it proves. A test proves what its assertions check: "handles expired token" that asserts only the status code proves the status code. If the repo has a fast command for the scoped tests, run it.
Past ~10 test files, fan out: give one subagent per test file the scenario list, and have each return scenario ID, file:line (layer), status rows plus its unmapped tests. Merge the rows; where two disagree, read the test yourself.
| Status | Meaning |
|---|---|
| ✅ Covered | A passing test proves this exact combination and its expected outcome |
| ⚠️ Partial | A test reaches it but proves less: weak assertions, the behaviour under test mocked away, only part of the combination, or failing |
| ❌ Missing | Nothing proves it: no test, only skipped tests (.skip, xit, @Disabled, pytest.mark.skip; noted as skipped), or no code yet (noted as unimplemented) |
| ➖ N/A | Unreachable by construction (reason given) |
Cite each test as file:line (layer). Every test lands on a scenario or in the Unmapped tests list. An unmapped test means either a missing dimension (return to step 2) or a dead/redundant test (say which).
Done when every scenario has a status with evidence, and every test is mapped or listed as unmapped.
Write it to docs/coverage/<feature>.md in the repo unless the user named another path, following TEMPLATE.md. If the file already exists, update it in place: keep existing IDs, give new scenarios the next free IDs, move scenarios whose code is gone to Retired with the reason, and preserve human-written notes. For several features, also write docs/coverage/README.md: one line per matrix with its coverage %.
Rank the Gaps section by risk: data loss, security, and money first; then user-facing errors; then cosmetic. Each gap names the scenario ID and a one-line test idea.
Done when the summary counts equal the row statuses. Then report the counts and top gaps in chat, and offer to write tests for them: test-first, one scenario per test, the scenario ID in the test name.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub leonardomso/skills --plugin leonardomso-skills3 skills in this plugin
/round-reviewReview a branch in rounds until one comes back clean. Each round checks the intended changes, tries to break the code, looks for regressions, and audits code quality, then fixes what it confirms./thermo-nuclear-code-quality-reviewRun an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.