coverage-analysis

Measure Solidity line, branch, and function coverage in Foundry projects.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill coverage-analysis-ccashwell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/coverage-analysis
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill coverage-analysis-ccashwell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Measures and improves Solidity test coverage by identifying untested code paths and guiding quality improvements in Foundry projects.

Core Features & Use Cases

  • Provides Forge coverage reports and LCOV outputs for visualization.
  • Enables coverage-driven testing workflows, including targeted test generation and filtering.
  • Supports CI integration to enforce coverage thresholds and track progress over time.

Quick Start

Run the coverage tool to generate a report and review the results to locate untested paths.

Frequently Asked Questions about coverage-analysis

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

FAQPage Schema
How do I measure Solidity test coverage in a Foundry project?

You can measure Solidity test coverage in a Foundry project by generating Forge coverage reports and LCOV outputs. This process identifies untested code paths across line, branch, and function coverage metrics to guide quality improvements.

What's the best way to visualize untested Solidity code paths?

The best way to visualize untested Solidity code paths is by generating LCOV outputs from your Foundry coverage reports. These outputs allow you to visually locate untested branches and functions within your codebase.

Can I enforce Solidity coverage thresholds in CI pipelines?

Yes, you can enforce Solidity coverage thresholds in CI pipelines by integrating Foundry coverage reports. This allows you to track coverage progress over time and enforce minimum line, branch, and function coverage requirements.

Do I need lcov and forge installed to analyze Solidity coverage?

Yes, you need both forge and lcov installed to analyze Solidity coverage. The workflow requires Foundry tooling to generate the initial reports and lcov to filter and visualize the coverage results effectively.

What is coverage-driven testing for Solidity smart contracts?

Coverage-driven testing for Solidity smart contracts is a workflow that uses Forge coverage reports to identify untested code paths. It guides targeted test generation and filtering to systematically improve code quality and test completeness.

Why does my Foundry coverage report show missing Solidity branches?

Your Foundry coverage report shows missing Solidity branches because the generated LCOV output identifies specific code paths that lack test execution. Reviewing these reports helps locate untested logic and drives targeted test generation.