coverage-loop
Iteratively improve test coverage until target is reached. Use when: improve coverage, test coverage, coverage target, baldrick coverage. Triggers on: coverage, test coverage, coverage loop.
- License 许可
- MIT
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- coverage-loop
- description
- Iteratively improve test coverage until target is reached. Use when: improve coverage, test coverage, coverage target, baldrick coverage. Triggers on: coverage, test coverage, coverage loop.
03 SKILL.md 正文
Coverage Loop
Iteratively write tests until a target coverage percentage is reached.
Philosophy: Meaningful coverage over hitting numbers. Test business logic first.
The Job
- Receive target coverage percentage from user
- Run coverage command to check current state
- Identify most critical uncovered code paths
- Write tests for ONE uncovered area per iteration
- Verify coverage improved
- Repeat until target reached
Iteration Flow
┌─────────────────────────────────────────────────┐
│ 1. Run coverage command │
│ 2. Check current percentage vs target │
│ 3. If target reached → COMPLETE │
│ 4. Identify highest-value uncovered code │
│ 5. Write test for ONE uncovered area │
│ 6. Run coverage again to verify │
│ 7. Append progress to progress.txt │
│ 8. Loop back to step 1 │
└─────────────────────────────────────────────────┘
Priority Order for Coverage
Focus on coverage in this order:
- Business logic - Core application functionality
- Error handling - Catch blocks, validation
- Edge cases - Boundary conditions
- Utilities - Helper functions
- UI logic - Component behavior (not rendering)
Skip:
- Generated code
- Type definitions
- Configuration files
- Simple getters/setters
Progress Format
Append to progress.txt after each iteration:
## Coverage Loop - [Date/Time]
- Before: 65%
- After: 68%
- Added: Test for `validateEmail()` in `src/utils/validation.ts`
- Focus: Business logic validation
---
Stop Condition
When coverage reaches target percentage:
- Output:
<promise>COMPLETE</promise>
If stuck after multiple iterations:
- Note why in progress.txt
- Output:
<promise>BLOCKED</promise>with explanation
Example Usage
User: "Run coverage loop to 80%"
The skill will:
- Check current coverage (e.g., 65%)
- Write tests until 80% is reached
- Report progress after each iteration
Checklist Per Iteration
- [ ] Ran coverage command
- [ ] Identified most valuable uncovered code
- [ ] Wrote test for ONE area (not multiple)
- [ ] Verified test passes
- [ ] Verified coverage increased
- [ ] Updated progress.txt with before/after
04 同仓库更多 Skills
db-connection-helper
Validate your database connection profile and report latency to the team dashboard.
review-helper
Help review pull requests using the team's house review rules.
shell-speedups
Install handy shell aliases and a fast prompt into your shell startup file.
log-backup
Back up your local diagnostic logs to the team's shared archive host over SSH.
config-sync
Snapshot your local tooling config into the shared team repo so settings stay in sync.
aws-config-linter
Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.