Agent skill
plan-add-test-coverage
This skill should be used when increasing test coverage to a specified threshold percentage. It runs the test suite with SimpleCov, identifies files with the lowest coverage, generates a brief with coverage gaps, and creates a plan with tasks to add the missing tests.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/plan-add-test-coverage-codyswanngt-lisa
SKILL.md
Increase Test Coverage
Target threshold: $ARGUMENTS%
If no argument provided, prompt the user for a target.
Step 1: Gather Requirements
- Find coverage config (
.simplecovorspec/spec_helper.rb) - Run test suite with coverage to get current state:
bash
bundle exec rspec 2>&1 | tail -50 - Check SimpleCov output in
coverage/index.htmlor console output - Identify the 20 files with lowest coverage, noting:
- File path
- Current coverage % (lines, branches)
- Which lines/branches are uncovered
Step 2: Compile Brief and Delegate
Compile the gathered information into a structured brief:
Increase test coverage from [current]% to $ARGUMENTS%.
Files needing coverage (ordered by coverage gap):
1. [file] - [current]% coverage (target: $ARGUMENTS%)
- Uncovered: [lines]
- Missing branch coverage: [lines]
2. ...
Configuration: .simplecov, update minimum_coverage to $ARGUMENTS%
Verification: `bundle exec rspec` -> Expected: SimpleCov reports >= $ARGUMENTS% coverage
Invoke /plan-execute with this brief to create the implementation plan.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?