coverage-ratchet
Skill0 starsChanged 4 months agoMITView on GitHub
Prevent test coverage from silently eroding — compare the current run against a stored baseline, fail if it dropped, and offer to lock in a higher baseline when it rose
1 other project uses a version of this.
Adopted by
Most recently taken up by
- CaduS0uza/qa-supremetheir own version, first seen Sep 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- CaduS0uza/qa-supreme★ 1same name
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 repository29 other files it gives its agents.
- adopt-existing-projectSkill
- adrSkill
- branch-conflict-checkSkill
- ci-watchSkill
- compound-learningsSkill
- config-auditSkill
- cost-checkSkill
- doc-syncSkill
- eval-harnessSkill
- flaky-triageSkill
- followup-trackingSkill
- incident-captureSkill
- kit-doctorSkill
- kit-updateSkill
- logging-initSkill
- migration-checkSkill
- new-project-bootstrapSkill
- nightly-auditSkill
- observability-checkSkill
- parallel-workSkill
- perf-budgetSkill
- pr-babysitterSkill
- pre-prSkill
- prompt-regressionSkill
- releaseSkill
- session-handoffSkill
- sync-healthSkill
- using-the-kitSkill
- writing-kit-skillsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 27
If the file does not exist, treat baseline as 0.0 and proceed — the first run will create it.
- Distinctive: line 64
If coverage dropped, the author must either:
- Distinctive: line 65
Add tests to restore it (preferred), or
- Very specific: line 70
Do not silently lower the baseline.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coverage Ratchet
Coverage numbers that can only go up (or stay flat) are a one-way gate. This
skill reads the project's baseline from .claude/kit.yaml and the stored
baseline file, runs the test suite with coverage, and enforces the floor. It
does not reason about which paths are covered — use the test-gap-analyzer
agent for that. This enforces the number. It does not edit source or tests;
its only write is the sanctioned baseline-file update in step 3, made only
with author confirmation.
Workflow
1. Read the baseline path
Open .claude/kit.yaml and read capabilities.coverage.baseline_file (default:
.coverage-baseline). That file contains a single float, e.g. 82.4.
If the file does not exist, treat baseline as 0.0 and proceed — the first run
will create it.
2. Run the test suite with coverage
# Python / uv — adjust to your toolchain (kit.yaml → toolchain.test)
uv run pytest tests/unit/ -m "not slow and not llm" \
--cov=src --cov-report=term-missing --cov-report=json -qParse the total line coverage percentage from coverage.json → .totals.percent_covered
(or from the terminal summary line TOTAL ... XX%).
3. Compare and decide
| Outcome | Action |
| Current < baseline | FAIL — report the delta; do not update the baseline. List files with the largest drops to guide the author. |
| Current == baseline | PASS — no action needed. |
| Current > baseline | PASS — offer to ratchet the baseline UP to the new value. Never lower it automatically. |
Strictness (gates.strictness in kit.yaml, see docs/PROFILE.md):
at prototype, a drop is reported as ADVISORY instead of FAIL and does not
block the PR — the numbers are informational until there is a baseline worth
defending. At production, ratchet_enabled: true with a missing baseline
file is a FAIL rather than a first-run bootstrap — generate the baseline before
gating.
To ratchet up: write the new percentage (two decimal places) to the baseline file and stage it:
echo "87.30" > .coverage-baseline
git add .coverage-baselineConfirm with the author before committing a baseline change — it's a deliberate policy update, not a mechanical fix.
4. Coverage drops are always intentional or a bug
If coverage dropped, the author must either:
- Add tests to restore it (preferred), or
- Explicitly acknowledge that the deleted/changed code was over-counted and the real-world coverage is unchanged — in which case update the baseline with a commit message explaining why.
Do not silently lower the baseline. Do not bypass with # pragma: no cover
without a comment explaining why.
Notes
- This skill complements test-gap-analyzer, which reasons about meaningful gaps (untested branches, missing edge cases). Run that agent after this one passes to catch coverage that is numerically present but logically shallow.
- Baseline file path is read from
.claude/kit.yamlevery run, so changing the project's coverage configuration requires updatingkit.yaml, not this skill.
Output
## Coverage Ratchet
- Current: <XX.XX %>
- Baseline: <XX.XX %> (from <.coverage-baseline>)
- Delta: <+N.NN % | -N.NN % | 0.00 %>
- Verdict: PASS | FAIL — coverage dropped N.NN % below baseline
Ratchet action: <none | offered to raise baseline to XX.XX %>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.

