coverage-loop

Improves Rust test coverage iteratively using cargo-llvm-cov with behavior-focused tests.

4.4k|154|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/fallow-rs/fallow --skill coverage-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-loop
Source: https://github.com/fallow-rs/fallow/tree/main/.agents/skills/coverage-loop
Command: npx skills add https://github.com/fallow-rs/fallow --skill coverage-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust projects often accumulate untested code paths, and developers struggle to decide which gaps matter and how to close them without writing shallow tests that merely execute lines. This Skill provides a disciplined loop for raising meaningful coverage in the Fallow codebase.

Core Features & Use Cases

  • Baseline Coverage Capture: Runs the repository-supported cargo-llvm-cov command to establish a measurable starting point.
  • Risk-Based Prioritization: Selects uncovered behavior by risk rather than by easiest lines, focusing effort where bugs would hurt most.
  • Behavior-Focused Test Writing: Adds tests that survive refactors and lock real invariants, rejecting assertions that only execute code.
  • Use Case: A contributor notices low coverage in Fallow's dependency-graph module, runs the loop to baseline coverage, writes targeted tests for the riskiest untested branches, re-runs coverage, and finishes with a review pass.

Quick Start

Ask the assistant to run the coverage loop on the Fallow repository to find and test the riskiest uncovered Rust behavior.

Frequently Asked Questions about coverage-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve Rust test coverage with cargo-llvm-cov?

Capture a coverage baseline with the repository-supported cargo-llvm-cov command, then add behavior-focused tests for the riskiest uncovered code. Re-run targeted tests and the same coverage command to confirm improvement, and repeat until the risk area is covered.

How to choose which uncovered code to test first?

Select uncovered behavior by risk rather than by easiest lines. Prioritize code paths where a bug would cause real harm, and write tests that lock actual invariants instead of merely executing statements.

What makes a good coverage test versus a shallow test?

A good coverage test checks observable behavior and survives refactors, while a shallow test only executes code without asserting meaningful outcomes. The loop explicitly rejects assertions that merely run code without verifying behavior.

When should I stop adding coverage tests?

Stop when the selected risk area is covered or when remaining gaps require a separate design change rather than more tests. Keep only tests that improve meaningful coverage or lock a real invariant, then run the review step.