Husky Test Coverage
Analyzes Husky commit messages to ensure adequate test coverage based on defined patterns and requirements.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add husky-test-coverage npx -- -y @trustedskills/husky-test-coverage
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"husky-test-coverage": {
"command": "npx",
"args": [
"-y",
"@trustedskills/husky-test-coverage"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
The husky-test-coverage skill integrates Husky, a Git hooks library, to automatically enforce test coverage thresholds during pull requests. It prevents code from being merged if the new changes fail to meet your specified minimum coverage percentage, ensuring quality control at the commit level.
When to use it
- Enforce strict test coverage requirements before any code is accepted into your main branch.
- Automatically block pull requests that introduce regressions or lack sufficient unit tests.
- Maintain consistent testing standards across all contributors without manual review overhead.
- Integrate seamlessly with existing CI/CD pipelines to catch coverage gaps early in the workflow.
Key capabilities
- Hooks into Git workflows to intercept push and pull request events.
- Validates test execution results against defined coverage thresholds.
- Automatically rejects merges that do not satisfy the configured coverage criteria.
- Provides immediate feedback to developers regarding missing test coverage.
Example prompts
- "Configure Husky to block all pull requests where test coverage drops below 80%."
- "Set up an automated check to ensure every new feature includes corresponding unit tests before merging."
- "Integrate a Git hook that runs the test suite and enforces a minimum coverage score on every commit."
Tips & gotchas
Ensure your project has a valid package.json with defined scripts for running tests, as Husky relies on these commands to execute coverage checks. Be aware that this skill only enforces thresholds; it does not generate tests or fix uncovered code paths itself.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.