test-coverage

test-coverage is a skill for Claude Code from elevanaltd/HestAI-MCP. It costs 23 tokens per session (1,310 once invoked), scanned A, original, Apache-2.0.

A workflow for using Python pytest coverage reports to find untested code and add tests systematically.

In plain words
What is it for?
Use it to inspect missing lines, prioritize security and behavior gaps, and apply TDD while improving coverage.
Why use it?
It helps reveal missing validation, edge-case, and error-handling tests instead of relying only on a total percentage.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect missing lines, prioritize security and behavior gaps, and apply TDD while improving coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/elevanaltd/hestai-mcp/test-coverage
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.

Any agent
npx skills add elevanaltd/HestAI-MCP --skill test-coverage
Clone the repo
git clone --depth 1 https://github.com/elevanaltd/HestAI-MCP

Made for: Claude Code.

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 test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-coverage/github.svg)](https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-coverage)
Your own site
<a href="https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-coverage"><img src="https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-coverage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-coverage

Your own site · 80×15
<a href="https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-coverage"><img src="https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,310 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00023 $0.01310
Opus 5 $0.00012 $0.00655
Sonnet 5 $0.00005 $0.00262
Haiku 4.5 $0.00002 $0.00131

Measured 7d ago against content hash 3b50081e40e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

test-coverage 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 7d 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.

src/hestai_mcp/_bundled_hub/library/skills/test-coverage/SKILL.md · 121 lines

How it starts

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

===TEST_COVERAGE=== META: TYPE::SKILL VERSION::"1.0" STATUS::ACTIVE PURPOSE::"Python pytest coverage analysis, gap identification, and TDD workflow for achieving 90%+ coverage" DOMAIN::ATHENA[quality]⊕ARTEMIS[precision_targeting]

§1::WHEN_TO_USE TRIGGERS::[ "Analyzing coverage reports and identifying gaps", "Planning tests to achieve 90%+ coverage targets", "Understanding uncovered line categories", "Applying TDD discipline to fill gaps systematically" ] COMPLEMENTARY::[test-infrastructure,test-ci-pipeline,testing]

§2::ANALYSIS_PROTOCOL STEP_1::RUN_COVERAGE[ COMMAND::"pytest --cov=src/{module} --cov-report=term-missing", OUTPUT::[Stmts::total,Miss::uncovered,Cover::percentage,Missing::line_numbers] ] STEP_2::CATEGORIZE_GAPS[ A::VALIDATION_PATHS[HIGH::security_critical,"raise ValueError('...')"], B::EDGE_CASES[MEDIUM::behavioral,"if not items: return None"], C::ERROR_HANDLERS[MEDIUM::defensive,"except OSError: logger.warning(...)"], D::INFRASTRUCTURE[LOW::diminishing_returns,"logger.debug(...)"] ] STEP_3::PRIORITIZE[ORDER::A→B→C→D,"Security first, then behavioral, then defensive, then optional"]

§3::TEST_PATTERNS VALIDATION_PATH::[ PATTERN::"Test invalid inputs raise appropriate exceptions", TEMPLATE::"def test_{fn}rejects{case}(): with pytest.raises({Error}): {fn}({invalid})" ] EDGE_CASE::[ PATTERN::"Test boundary conditions and None/empty handling", TEMPLATE::"def test_{fn}handles{edge}(): assert {fn}({input}) == {expected}", COMMON::[None,empty_string,empty_list,zero,negative,max_value] ] ERROR_HANDLER::[ PATTERN::"Mock dependencies to trigger exception paths", TEMPLATE::"with patch.object({T}, '{m}', side_effect={E}): assert {fn}(...) == {fallback}" ]

§4::TARGETS THRESHOLDS::[ 90%::MINIMUM[quality_gate], 95%::RECOMMENDED[comprehensive], 100%::ASPIRATIONAL[critical_paths_only] ] CRITICAL_PATHS::[security_validation,auth,data_transformation,public_api] ACCEPTABLE_GAPS::[platform_specific,debug_logging,rare_defensive_handlers,third_party_errors]

§5::TDD_DISCIPLINE RED_GREEN_REFACTOR::[ RED::"Write failing test that exercises uncovered line", GREEN::"Verify test passes (line already implemented)", REFACTOR::"Improve test clarity" ] COVERAGE_ADAPTATION::[ DIFFERENCE::"Code exists, tests retroactive", APPROACH::"Write test FIRST, verify covers target line", VERIFICATION::"Run --cov before/after" ] GIT_EVIDENCE::"test({module}): improve coverage from X% to Y%"

§6::COMMANDS BASIC::"pytest --cov=src/{module}" TERM_MISSING::"pytest --cov=src/{module} --cov-report=term-missing" HTML::"pytest --cov=src/{module} --cov-report=html" FAIL_UNDER::"pytest --cov=src/{module} --cov-fail-under=90" SPECIFIC::"pytest tests/unit/{path}/test_{file}.py --cov=src/{path}/{file}" BRANCH::"pytest --cov=src/{module} --cov-branch"

§7::COMMON_PATTERNS RECOGNITION::[ EARLY_RETURN::"if not x: return None"→test_with_falsy, EXCEPTION_RAISE::"raise ValueError(...)"→test_invalid_expect_raises, EXCEPT_BLOCK::"except {E}: logger.warning(...)"→mock_to_raise, FALLBACK_PATH::"else: return default"→test_else_condition, LOOP_CONTINUE::"if not cond: continue"→include_failing_item, OS_ERROR::"except OSError: pass"→mock_file_op_to_raise ]

§8::ANTI_PATTERNS COVERAGE_THEATER::[ SYMPTOM::"Tests exercise code but don't assert behavior", EXAMPLE::"def test_fn(): fn() # no assertions", REMEDY::"Every test must have meaningful assertions" ] OVER_MOCKING::[ SYMPTOM::"Mock so much tests prove nothing", EXAMPLE::"Mock all deps, assert mock called", REMEDY::"Mock only external boundaries" ] CHASING_100::[ SYMPTOM::"Excessive effort for marginal gains", EXAMPLE::"Complex mocks to hit debug log", REMEDY::"Accept 95% with documented gaps" ]

§9::WORKFLOW STEPS::[ 1::"Run pytest --cov with term-missing", 2::"Identify highest-priority gaps (A→B→C→D)", 3::"Write targeted tests per category", 4::"Verify improvement after each batch", 5::"Commit: test({module}): improve coverage", 6::"Document remaining acceptable gaps" ]

Read the full file on GitHub · 121 lines

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. 7d ago First seen · 121 lines · 23 tokens per session scan A 3b50081e40e9

Subscribe to this mod's changes

test-coverage is a skill published in the GitHub repository elevanaltd/HestAI-MCP (0 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 1,310 once invoked, about $0.0001 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-09-03.