coverage-gate

coverage-gate is a skill for Claude Code from juanmhidalgo/claude-plugins. It costs 33 tokens per session (1,148 once invoked), scanned A, original, MIT.

A check that compares code coverage—the share of code exercised by tests—with the thresholds configured in GitHub Actions, GitHub's automated build and test service.

In plain words
What is it for?
Use it to find coverage settings, convert their thresholds into percentages, categorize changed files, and skip the check when no coverage rule exists.
Why use it?
It shows whether new or changed code meets the project's testing requirements before a change is pushed or processed.

Skill for Claude Code

Written for Claude Code: disallowed-tools in frontmatter. Also seen: names the NotebookEdit tool.

Part of the code-review plugin — 5 skills, 14 commands, 13 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/juanmhidalgo/claude-plugins/coverage-gate
Any agent
npx skills add juanmhidalgo/claude-plugins --skill coverage-gate
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install code-review, the plugin that ships this one along with the rest of its 5 skills, 14 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for coverage-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/coverage-gate.svg)](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/coverage-gate)
Your own site
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/coverage-gate"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/coverage-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01148
Opus 5 $0.00016 $0.00574
Sonnet 5 $0.00007 $0.00230
Haiku 4.5 $0.00003 $0.00115

Measured 6d ago against content hash b4a340ecd14d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

coverage-gate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

code-review/skills/coverage-gate/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GHA Threshold Detection

Search .github/workflows/*.yml for coverage actions and extract thresholds.

Supported Actions

Action Threshold Fields Format
orgoro/coverage thresholdAll, thresholdNew, thresholdModified Decimal 0-1 (multiply by 100)
irongut/CodeCoverageReport thresholds '60 80' (warning failure) — use failure value
5monkeys/cobertura-action minimum_coverage Integer 0-100
codecov/codecov-action None inline — check codecov.yml at repo root target: 80%

Detection Steps

  1. Glob for .github/workflows/*.yml
  2. Grep for coverage action patterns
  3. Read the matching workflow file
  4. Extract threshold values from with: block
  5. Normalize all thresholds to percentages (0-100 scale)

If no coverage config found: Skip the coverage gate entirely with a note.

Default thresholds (when action exists but thresholds are partially configured):

  • thresholdAll: 55%
  • thresholdNew: 80%
  • thresholdModified: 65%

File Categorization

Map GHA categories to git state:

Category PR Context Staged Context
New files git diff --name-only --diff-filter=A <base>...HEAD git diff --cached --name-only --diff-filter=A
Modified files git diff --name-only --diff-filter=M <base>...HEAD git diff --cached --name-only --diff-filter=M
All files Overall coverage report Overall coverage report

Filter to source files only — exclude test files, configs, docs, migrations, __init__.py.

Coverage Tool Detection

Detect the project's coverage tool. Check the GHA workflow first — it reveals the exact command and flags.

Ecosystem Config Files Coverage Command Report
Python (pytest-cov) pyproject.toml, setup.cfg pytest --cov --cov-report=xml coverage.xml
Python (coverage.py) .coveragerc coverage run -m pytest && coverage xml coverage.xml
Node (jest) package.json npx jest --coverage --coverageReporters=cobertura coverage/cobertura-coverage.xml
Node (vitest) vitest.config.* npx vitest run --coverage coverage/cobertura-coverage.xml
Go go.mod go test -coverprofile=coverage.out ./... coverage.out

Read the full file on GitHub · 100 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 100 lines · 33 tokens per session scan A b4a340ecd14d

Subscribe to this mod's changes

coverage-gate is a skill published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 11d ago), licensed MIT. It adds 33 tokens to every session and 1,148 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.