code-coverage-analysis
Skill1 starsChanged 52 days agoMITView on GitHub
Use when measuring or improving test coverage — line, branch, function, condition/MC-DC and diff/patch coverage; coverage tools (coverage.py, Istanbul/c8, JaCoCo, gcov, go cover); setting sensible thresholds; and finding meaningful gaps rather than chasing 100%.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- InternationalColorConsortium/iccDEVtheir own version, first seen Nov 9, 2026
- mckennabarlow/skillstheir own version, first seen Sep 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- InternationalColorConsortium/iccDEV★ 187same name
- mckennabarlow/skills★ 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 repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- bdd-gherkin-testingSkill
- blockchain-smart-contract-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- event-driven-messaging-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- graphql-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- microservices-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Look at uncovered *branches* in error handling, permissions, rollbacks, timeouts.
- Distinctive: line 49
Ask "what bug would slip through here?" — write the test for that, not for the line.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Code Coverage Analysis
Coverage tells you what is definitely not tested, never what is well tested. Use it to find holes, not as a target to game.
Metric ladder
| Metric | Meaning | Use |
| Line/statement | executed lines | baseline |
| Branch | each if/else/case taken both ways | preferred default |
| Function/method | each function called | API surface |
| Condition / MC/DC | each boolean sub-condition affects outcome | safety-critical (DO-178C, ISO 26262) |
| Diff / patch | coverage of changed lines only | best PR gate |
| Mutation score | do tests detect changes | quality proof (mutation-testing) |
Commands
# Python
pytest --cov=src --cov-branch --cov-report=term-missing --cov-report=xml --cov-fail-under=80
# JS/TS (Vitest/Jest/c8)
npx vitest run --coverage # or: jest --coverage ; c8 node --test
# Java (Maven + JaCoCo)
mvn verify # jacoco:report → target/site/jacoco/index.html
# Go
go test ./... -coverprofile=c.out -covermode=atomic && go tool cover -html=c.out
# C/C++
gcc --coverage ... && gcov file.c ; lcov --capture -d . -o cov.info && genhtml cov.info
# Diff coverage on PRs
diff-cover coverage.xml --compare-branch=origin/main --fail-under=90Setting thresholds
- Overall gate: modest & ratcheting (e.g. ≥ 75% branch, never decrease).
- Patch gate ≥ 85–90% on new/changed lines (Codecov/Coveralls/diff-cover).
- Higher (95%+) for money/auth/crypto/parsers; exclude generated code, migrations, trivial DTOs explicitly with reasons.
Reading a report — find meaningful gaps
- Sort by uncovered lines × complexity × change frequency (churn hotspots).
- Look at uncovered branches in error handling, permissions, rollbacks, timeouts.
- Ask "what bug would slip through here?" — write the test for that, not for the line.
- Confirm tests have assertions (a test that calls code without asserting yields fake coverage) → run mutation testing on hotspots.
Merge coverage across layers
Unit + integration + E2E (nyc merge, coverage combine, JaCoCo merge), and for E2E use server-side instrumentation to see what real journeys exercise.
Pitfalls
Goodhart's law (100% target → assertion-free tests) · counting test files in coverage · ignoring branches · exclusion creep (# pragma: no cover everywhere) · coverage from flaky/skipped tests.
Related
unit-testing, mutation-testing, test-metrics-reporting, cicd-testing, regression-testing
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.

