Skip to content
Skill

Coverage loop

Raises a project's test coverage to its configured target while keeping the suite green

Coverage loop is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
12
Last commit
License
MIT
Listing updated

Similar skills

About Coverage loop

Coverage Loop is a Claude Code skill that repeatedly measures a project's test coverage, picks the least-covered meaningful unit, writes behavior-checking tests for it, and re-measures the whole report. It only stops once the freshly generated coverage report meets the target in the project's profile or coverage config and the full test suite passes in the same run. The loop keeps a plan file of under-covered units and a log of each round, and commits a checkpoint on rounds that raise coverage.

The skill enforces anti-gaming rules: assertion-free tests, added coverage excludes or ignore pragmas, and lowered thresholds are treated as findings rather than progress. It stops on reaching the target, an iteration cap, three rounds without progress, or a budget cap, and it can hand off to a fix-until-green step when the existing suite is failing.

It expects a project with a coverage command and a configured target, and it reads reports such as coverage.xml, lcov.info or a coverage summary. The skill is set to run only when a user invokes it, and it is part of the Skill Madness collection of loop skills.

When your agent uses it

Grow a test suite to a coverage target: find the lowest-covered meaningful unit, add real behavior tests, re-measure, until coverage meets the target in .claude/profile.yaml and the suite is green. Assertion-free tests and coverage excludes count as findings. Use when coverage is below target. Trigger on "raise coverage", "hit the coverage target", "get to N percent coverage".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (18 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the skill-madness plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness

Or copy only this skill to ~/.claude/skills/coverage-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/coverage-loop &&
cp -R "$tmp/skills/loops/coverage-loop" ~/.claude/skills/coverage-loop &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/coverage-loop inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/coverage-loop to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/coverage-loop &&
cp -R "$tmp/skills/loops/coverage-loop" ~/.agents/skills/coverage-loop &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/coverage-loop inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/coverage-loop to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/coverage-loop &&
cp -R "$tmp/skills/loops/coverage-loop" ~/.cursor/skills/coverage-loop &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/coverage-loop inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/loops/coverage-loop

Or copy the folder to ~/.gemini/skills/coverage-loop yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/coverage-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/coverage-loop &&
cp -R "$tmp/skills/loops/coverage-loop" ~/.copilot/skills/coverage-loop &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/coverage-loop inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git

Then copy Skill-Madness/skills/loops/coverage-loop into your agent's skills folder as coverage-loop. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Lowest-coverage unit targeting
Finds the least-covered meaningful function, branch or module and works on one unit per round.
Fresh report verification
Confirms the target using a newly generated coverage report and a passing full test suite.
Anti-gaming checks
Flags assertion-free tests, added coverage excludes and lowered thresholds as failures.
Progress and stop limits
Stops on target, iteration cap, three flat rounds or budget cap, and escalates rather than faking numbers.
Plan file and checkpoints
Records under-covered units and a per-round log in a plan file and commits each coverage-raising round.
Fix-until-green handoff
Delegates to a separate fix loop when the existing suite is red before adding more tests.

Good for

  • Raise test coverage to the 80 percent target in the project profile
  • Add behavior tests for the least-covered modules after a build wave
  • Get the Python package to its pytest --cov-fail-under threshold
  • Find and cover untested branches in the API layer until the coverage gate passes

Coverage loop FAQ

Where does the skill read its coverage target from?

It reads the target from .claude/profile.yaml, falling back to the project's coverage config such as .coveragerc, jest coverageThreshold or pytest --cov-fail-under. If no target is declared, it stops and asks.

What tools does Coverage loop use?

It is allowed to use Read, Write, Edit, Bash, Grep and Glob.

Can Coverage loop run automatically?

No. Its invocation is disabled for the model, so it runs when a user types the command or when the orchestrator dispatches it.

What counts as cheating in this loop?

Assertion-free tests, excluding files or adding ignore pragmas, lowering the configured threshold, and deleting or skipping hard-to-cover tests are all treated as findings.

How do I install Coverage loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/coverage-loop to use it in all your projects, or to .claude/skills/coverage-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

Does Coverage loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Coverage loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Coverage loop?

The closest alternatives to Coverage loop are Perf loop, Migration loop, Fix until green, Optimize loop and Loop controller.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ivy00johns/Skill-Madness

  1. Finds merged and stale git branches, then deletes them only after your confirmation

    • Open source
    • 12 GitHub stars
    • Developer tools
  2. Finds and removes git worktrees whose changes are already merged into main

    • Open source
    • 12 GitHub stars
    • Developer tools
  3. Bulk-scans a skill ecosystem for consistency, quality gaps and ownership conflicts

    • Open source
    • 12 GitHub stars
    • Developer tools
  4. Runs a single-skill quality review covering structure, triggering and output checks

    • Open source
    • 12 GitHub stars
    • Developer tools
  5. Turns skill review or audit reports into a prioritized list of concrete SKILL.md fixes

    • Open source
    • 12 GitHub stars
    • Developer tools
  6. Applies planned edits to SKILL.md files, validates them, and offers to sync

    • Open source
    • 12 GitHub stars
    • Developer tools