coverage
Skill3 starsChanged 5 months agoMITView on GitHub
Measures, assesses, and improves test coverage with risk/feasibility triage — and flags coverage theater (shallow string/source mirrors). Use when the user invokes /coverage, asks which areas need tests, wants to add coverage for a specific area, or asks about coverage gaps, priorities, or weak/theater tests.
35 other projects use a version of this.
Adopted by
Most recently taken up by
- oberemokis/skillstheir own version, first seen Nov 29, 2026
- mystilleef/spae-frameworktheir own version, first seen Nov 24, 2026
- yacb2/aidextheir own version, first seen Nov 19, 2026
- TsukiNi22/skillstheir own version, first seen Nov 16, 2026
- TsukiNi22/ai-utilstheir own version, first seen Nov 16, 2026
- LeanMeanCleanApps/CleanLambdaFunctiontheir own version, first seen Nov 15, 2026
Used with
Projects with it also use add-a-use-case, branches-and-pull-requests and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LeanMeanCleanAppsSkilladd-a-use-case
How to add a command or query to the Application layer as a vertical slice (request, handler, validator, tests) using source-generated Mediator. Use when adding a new feature, a new query, or a new write operation.
Also in 5 projects that use this
LeanMeanCleanAppsSkillbranches-and-pull-requests
Branch naming (feature/, fix/, chore/), how labels and release notes follow from the branch, the pull request template, and how changes get merged in the template repository. Use when creating a branch, writing a commit or opening a pull request.
Also in 5 projects that use this
- +10 more from LeanMeanCleanApps
Other versions35 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 35
- FalkorDB/FalkorDB★ 11ksame name
- pydantic/monty★ 9.2ksame name
- LiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator★ 2.1ksame name
- firedancer-io/firedancer★ 1.6ksame name
- wboayue/rust-ibapi★ 410same name
- LeanMeanCleanApps/CleanMinimalApi★ 401same name
- hegeldev/hegel-rust★ 400same name
- nockawa/Typhon★ 254same name
- Amplicode/spring-skills★ 126same name
- AsiaOstrich/universal-dev-standards★ 86same name
25 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- backlogSkill
- commitSkill
- copySkill
- deslopSkill
- fixSkill
- global-code-reviewSkill
- grand-syncSkill
- implementSkill
- interviewSkill
- pnpm-migrateSkill
- prod-error-fixSkill
- prSkill
- raptorSkill
- soakSkill
- testsSkill
- typesafe-aiSkill
- verify-thisSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Run via /tests logging rules (full logs, no pipe).
- Very specific: line 38
Refuse / skip: when the only win is covering another if in an already well-tested file with no distinct product stake.
- Distinctive: line 43
Prefer ≤3 distinct cases per pass (one behavior per case.
- Distinctive: line 75
One or two anchor phrases max: when copy *is* the contract (e.g.
- Distinctive: line 84
Run the project coverage command.
- Distinctive: line 95
Prefer (in order): (1) named missing behaviors in the gap tracker, (2) rewrite/delete theater, (3) residual % only when the case is a …
- Distinctive: line 97
When an area already has tests, ask: do they lock behavior, or just wording/markup?
- Distinctive: line 105
Add meaningful tests that pass the quality gate.
“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coverage
Goal: improve real confidence and testability within reason — know gaps, prioritize by behaviors, reject theater that only mirrors implementation, accept documented blind spots where automation is poor ROI. Line/branch % is evidence, not the objective; high % with shallow assertions is a false green.
Discover repo conventions
| Need | Look for |
| Coverage command | test:coverage, coverage, vitest/jest/nyc config |
| Gap tracker | docs/coverage.md or equivalent |
| Test patterns | component-testing docs, fixtures, e2e vs unit |
| Project overlay | <repo>/.cursor/skills/coverage.local/ when present |
Run via /tests logging rules (full logs, no pipe). When a project overlay exists, follow this skill first, then the overlay.
Commands
| User says | Do |
/coverage | Refresh metrics, summarize gaps, scan for theater, recommend next targets |
/coverage … need tests | Rank by risk × gap (behaviors, not residual %; discount theater-inflated areas) |
/coverage theater | Audit for shallow mirrors; do not chase line % |
/coverage add … for <area> | Admission plan → behavioral tests → scoped coverage → update gap doc |
Quality gate (before writing tests)
Admission criteria — for each proposed case, write (chat or PR body):
- Behavior — one sentence, user-visible or data-integrity
- Failure mode — if this regresses, user/system sees X
- Test shape — mount+event, HTTP route contract, pure helper, or eval — not “hit uncovered lines”
Refuse / skip when the only win is covering another if in an already well-tested file with no distinct product stake. Prefer documenting an accepted blind spot or rewriting theater over packing residual branches.
Definition of done
- A deliberate break of the named behavior would fail the new test
- Prefer ≤3 distinct cases per pass (one behavior per case; no mega-tests)
- Scoped coverage % may rise as secondary evidence — never the sole success metric
- Gap tracker updated with the behavior closed, not only a new line %
Theater (do not ship)
Coverage theater = tests that mostly assert “the code we wrote is still the code we wrote” — no logic, branches, failure modes, or user-visible outcomes exercised. Brittle under copy/CSS refactors, and false confidence.
| Red flag | Why it’s weak |
readFileSync / source greps on .svelte, .css, implementation text | Never mounts or runs the unit; locks implementation text |
Long prompt/copy toContain slogan lists | Mirrors wording; no branch or failure coverage |
| Exact Tailwind/CSS class strings or layout tokens | Style churn ≠ behavior |
| “Source contract” / “implements OPP-NNN” tests that only grep source | Documents intent in the wrong layer |
| Snapshot-of-prose with no inputs varied | Same as string laundry lists |
| Mock-only route-shape spam with no product-stakes failure mode | Asserts the mock, not the contract |
| Packing unrelated branches into one test to lift % | Optimizes the metric, not the risk |
| Usually not theater — keep | Why it’s real |
| Fixture values appear / wrong values do not | Data plumbing |
| Flag on → section present; flag off → absent | Conditional logic |
| Invariants: secrets omitted, dangerous tools absent, schema shape | Safety contracts |
| User action → callback / navigation / persistence / error state | Behavior |
| Parser/transform goldens with varied inputs and edge cases | Logic |
| Evals / judge harnesses for agent quality | Outcome-level (different layer) |
Replacement heuristics — prefer tests that stay meaningful if someone rewrote the copy, renamed a CSS class, or rephrased a prompt without changing behavior:
- Vary inputs — empty, boundary, conflicting flags, bad data
- Assert outcomes — return shape, side effects, DOM roles/state, HTTP status, DB rows
- Assert semantic contracts — “must instruct X before Y,” “must not include secrets” — not the full slogan list
- One or two anchor phrases max when copy is the contract (e.g. a user-facing error code) — never a laundry list
- Delete or rewrite source-
readFileSynctests; if line % was the only win, replace with a mount/behavior test or accept a documented blind spot
Refuse pure theater even when it would move the % needle. Project overlays may name concrete theater clusters; apply those filters too.
Workflow
1. Measure
Run the project coverage command. Prefer scoped coverage on new test files after adding them; full suite only for audits / snapshot metrics.
2. Prioritize (risk × feasibility)
Score High / Medium / Low on each axis — for behaviors, not files alone.
- Risk: user/data harm if untested (auth, payments, sync, agent tools = high; chrome/dev-only = low)
- Feasibility: pure functions/routes = high; full OAuth / pixel-perfect / credential e2e = low
Tackle high risk + high/medium feasibility first. High risk + low feasibility → document accepted gap + lighter substitute.
Prefer (in order): (1) named missing behaviors in the gap tracker, (2) rewrite/delete theater, (3) residual % only when the case is a distinct regression class.
When an area already has tests, ask: do they lock behavior, or just wording/markup? Theater does not reduce residual risk.
3. Choose test type
Match project norms: unit, component, integration, eval, e2e.
4. Improve and record
Add meaningful tests that pass the quality gate. Update the gap tracker when closing a tracked gap or when demoting an area from “covered” to “theater / weak.” Re-measure scoped coverage for the target.
Output
Top recommended targets (3–5) with risk, feasibility, behavior under test, suggested test shape, and theater notes (none / mild / heavy) — plus what changed in the gap doc if anything. Mark theater/weak so those gaps are not “closed.”
For /coverage add, include the admission criteria answers in the closing summary (and PR body when opening one).
Automation
Overnight / cloud coverage agents: ship ≤3 high-value cases or open no PR. If only theater-feasible work remains, update accepted blind spots / suggested next actions and exit without a test PR.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

