.claude/skills/coverage-drop-investigator/SKILL.md
Use when test coverage has dropped and you need to find which changes caused it and what tests to add. Traces coverage regressions to specific commits and files.
npx skillsauth add proffesor-for-testing/agentic-qe coverage-drop-investigatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Runbook-style skill for investigating coverage regressions. Identifies which changes caused coverage to drop and recommends targeted tests.
/coverage-drop-investigator
# Generate coverage report
npx jest --coverage --coverageReporters=json-summary
# View summary
cat coverage/coverage-summary.json | jq '.total'
# Compare coverage with main branch
git stash && npx jest --coverage --coverageReporters=json-summary
mv coverage/coverage-summary.json coverage/baseline.json
git stash pop && npx jest --coverage --coverageReporters=json-summary
# Compare
jq -s '.[0].total.statements.pct as $baseline | .[1].total.statements.pct as $current | {baseline: $baseline, current: $current, delta: ($current - $baseline)}' coverage/baseline.json coverage/coverage-summary.json
# Find files with lowest coverage
cat coverage/coverage-summary.json | jq 'to_entries | map(select(.key != "total")) | sort_by(.value.statements.pct) | .[0:10] | .[] | {file: .key, statements: .value.statements.pct, branches: .value.branches.pct}'
# Find recently changed files with low coverage
git diff --name-only main...HEAD | while read file; do
jq --arg f "$file" '.[$f] // empty | {file: $f, statements: .statements.pct}' coverage/coverage-summary.json
done
For each uncovered file, identify:
## Coverage Drop Report
- **Current**: {{current_pct}}%
- **Baseline (main)**: {{baseline_pct}}%
- **Delta**: {{delta}}%
- **Files causing drop**:
| File | Coverage | Changed Lines | Tests Needed |
|------|----------|--------------|-------------|
| {{file}} | {{pct}}% | {{lines}} | {{count}} |
- **Recommended action**: {{write_tests / accept_drop / mark_as_excluded}}
After investigation:
/qe-test-generation — generate tests for uncovered files/mutation-testing — verify existing tests actually catch bugs/coverage-guard — prevent future dropsdevelopment
Apply XP practices including pair programming, ensemble programming, continuous integration, and sustainable pace. Use when implementing agile development practices, improving team collaboration, or adopting technical excellence practices.
development
Warehouse Management System testing patterns for inventory operations, pick/pack/ship workflows, wave management, EDI X12/EDIFACT compliance, RF/barcode scanning, and WMS-ERP integration. Use when testing WMS platforms (Blue Yonder, Manhattan, SAP EWM).
testing
Advanced visual regression testing with pixel-perfect comparison, AI-powered diff analysis, responsive design validation, and cross-browser visual consistency. Use when detecting UI regressions, validating designs, or ensuring visual consistency.
development
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.