coverage-guard
/coverage-guard
Zapobiega regresjom pokrycia testami podczas pracy: po poleceniu /coverage-guard ostrzega, gdy pokrycie spada poniżej progu po zmianach kodu.
- Repozytorium
- agentic-qe ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/check-coverage.sh
Co robi i kiedy
Zapobiega regresjom pokrycia testami podczas pracy: po poleceniu /coverage-guard ostrzega, gdy pokrycie spada poniżej progu po zmianach kodu.
Oryginalny opis (EN)
Use when you want to prevent coverage regressions during development. Activate with /coverage-guard to warn when coverage drops below threshold after code changes.
Jak działa
- What It Does
- Activation
- Configuration
- Hook Configuration
- Enforcement Logic
- Gotchas
Podgląd SKILL.md
---
name: coverage-guard
description: "Use when you want to prevent coverage regressions during development. Activate with /coverage-guard to warn when coverage drops below threshold after code changes."
user-invocable: true
---
# Coverage Guard Mode
When activated, checks coverage after test runs and warns if it drops below the configured threshold.
## What It Does
After any test execution (via Bash tool), compares coverage to the threshold in config.json. Warns (doesn't block) if coverage decreased.
## Activation
```
/coverage-guard
```
## Configuration
Edit `config.json` in this skill directory to set thresholds:
```json
{
"thresholds": {
"statements": 80,
"branches": 70,
"functions": 75,
"lines": 80
},
"coverageCommand": "npx jest --coverage --coverageReporters=json-summary",
"coverageFile": "coverage/coverage-summary.json"
}
```
## Hook Configuration
```json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hook": ".claude/skills/coverage-guard/scripts/check-coverage.sh",
"condition": "command contains 'jest' OR command contains 'vitest' OR command contains 'npm test'"
}
]
}
}
```
## Enforcement Logic
```bash
#!/bin/bash
# check-coverage.sh
COVERAGE_FILE="coverage/coverage-summary.json"
THRESHOLD=80
if [ -f "$COVERAGE_FILE" ]; then
STATEMENTS=$(jq '.total.statements.pct' "$COVERAGE_FILE")
BRANCHES=$(jq '.total.branches.pct' "$COVERAGE_FILE")
if (( $(echo "$STATEMENTS < $THRESHOLD" | bc -l) )); then
echo "WARNING: Statement coverage ($STATEMENTS%) below threshold ($THRESHOLD%)"
echo "Coverage dropped — check which files lost coverage."
fi
if (( $(echo "$BRANCHES < 70" | bc -l) )); then
echo "WARNING: Branch coverage ($BRANCHES%) below 70%"
fi
fi
```
## Gotchas
- Coverage check runs AFTER the test command — if tests crash, no coverage report is generated
- Coverage-summary.json must be configured as a reporter — default Jest config may not include it
- Threshold comparisons use floating point — `79.999%` will trigger below `80%` threshold
- Branch coverage is typically 10-15% lower than line coverage — set thresholds accordingly
Pliki w paczce (2)
- SKILL.md 2 KB
- scripts/check-coverage.sh 1 KB
Wersje
W bazie nie ma innych skilli o nazwie coverage-guard.
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki 3f6ce908cc18 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90Coverage Guard
Sprawdza pokrycie testami, znajduje nieprzetestowany kod i dopisuje brakujące testy, dążąc do pełnego pokrycia. - 100test-coverage
Znajduje nieprzetestowane ścieżki kodu i pisze celowane testy jednostkowe lub integracyjne, gdy pokrycie spada poniżej celu albo nowy moduł nie ma testów. - 90test-coverage-improver
Mierzy pokrycie testami JS SDK i uzupełnia zmierzone luki, przy audytach pokrycia i regresjach metryk. - 100analyzing-test-coverage
Analizuje metryki pokrycia kodu testami i wskazuje nieprzetestowane fragmenty kodu. - 100analyzing-test-coverage
Analizuje metryki pokrycia kodu testami i wskazuje nieprzetestowane fragmenty kodu. - 100codecov-coverage
Pobiera z API Codecov i analizuje pokrycie kodu testami projektu linkml, na przykład przed PR-em, przy zmianach pokrycia i w poszukiwaniu plików o niskim pokryciu.