Coverage Ratcheting

Enforce that test coverage never decreases — compare current coverage against baseline, flag regressions, and track per-package coverage trends

16 stars

Best use case

Coverage Ratcheting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Enforce that test coverage never decreases — compare current coverage against baseline, flag regressions, and track per-package coverage trends

Teams using Coverage Ratcheting should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/coverage-ratcheting/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/testing-security/coverage-ratcheting/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/coverage-ratcheting/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Coverage Ratcheting Compares

Feature / AgentCoverage RatchetingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Enforce that test coverage never decreases — compare current coverage against baseline, flag regressions, and track per-package coverage trends

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Coverage Ratcheting Skill

Enforce a coverage ratchet: coverage for each package must never decrease from its high-water mark.

## Trigger Conditions
- Test suite run completes with coverage data
- PR is submitted for review
- Coverage thresholds are checked in CI
- User invokes with "coverage check" or "coverage-ratcheting"

## Input Contract
- **Required:** Current coverage data (from `go test -cover`)
- **Optional:** Previous coverage baseline for comparison

## Output Contract
- Per-package coverage percentages
- Coverage delta from baseline (improved / unchanged / regressed)
- Packages below minimum threshold per rule 123
- Ratchet violations (packages that decreased from high-water mark)
- Recommended test additions to close gaps

## Tool Permissions
- **Read:** Test files, coverage reports, source files
- **Write:** Coverage baseline file (if updating)
- **Shell:** Run `go test -coverprofile`
- **Search:** Grep for untested functions

## Execution Steps

1. **Run tests with coverage**: Execute `go test -coverprofile=coverage.out ./...`
2. **Parse coverage**: Extract per-package and per-function coverage
3. **Compare to baseline**: Check each package against its previous high-water mark
4. **Check thresholds**: Verify each package meets minimum thresholds per rule 123
5. **Identify regressions**: Flag any package where coverage decreased
6. **Recommend**: For packages below threshold, identify the uncovered functions
7. **Update baseline**: If coverage improved, update the high-water mark

## Minimum Thresholds (from rule 123)
- `internal/service/` — 90%
- `internal/repository/` — 85%
- `internal/handler/` — 80%
- `internal/middleware/` — 80%
- `internal/models/` — 75%

## References
- `.cursor/rules/123-test-requirement-matrix.mdc`

Related Skills

ln-634-test-coverage-auditor

16
from diegosouzapw/awesome-omni-skill

Coverage Gaps audit worker (L3). Identifies missing tests for critical paths (Money 20+, Security 20+, Data Integrity 15+, Core Flows 15+). Returns list of untested critical business logic with priority justification.

analyze-test-coverage

16
from diegosouzapw/awesome-omni-skill

Analyze test coverage gaps and report findings

acc-analyze-test-coverage

16
from diegosouzapw/awesome-omni-skill

Analyzes PHP codebase for test coverage gaps. Detects untested classes, methods, branches, exception paths, and edge cases. Provides actionable recommendations.

analyzing-test-coverage

16
from diegosouzapw/awesome-omni-skill

Creates and analyzes tests using Vitest and MSW patterns. Generates test builders, mocks repositories, and configures integration tests. Triggers on: write tests, test coverage, Vitest, MSW mock, vi.fn, vi.mock, unit test, integration test, test builder, mock setup, test failure.

agent-coverage-check

16
from diegosouzapw/awesome-omni-skill

Check agent configuration coverage across hierarchy levels and phases. Use to ensure complete agent system coverage.

add-test-coverage

16
from diegosouzapw/awesome-omni-skill

Analyze recent changes and add test coverage for HEAD commit

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

Load Test Designer

16
from diegosouzapw/awesome-omni-skill

Design load tests with realistic workload models and performance criteria

ln-523-auto-test-planner

16
from diegosouzapw/awesome-omni-skill

Plans automated tests (E2E/Integration/Unit) using Risk-Based Testing after manual testing. Calculates priorities, delegates to ln-301-task-creator. Worker for ln-520.

legal-compliance-agent

16
from diegosouzapw/awesome-omni-skill

Generate legally compliant privacy policies, terms of service, HIPAA documentation, and compliance pages for healthcare SaaS platforms. Ensures Google Play/App Store approval and GDPR/HIPAA compliance.

lc-test

16
from diegosouzapw/awesome-omni-skill

Test a Rust solution file against LeetCode's test cases (project)

laravel-security-audit

16
from diegosouzapw/awesome-omni-skill

Security auditor for Laravel applications. Analyzes code for vulnerabilities, misconfigurations, and insecure practices using OWASP standards and Laravel security best practices.