Agent skill

Coverage Analysis

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements.

MITAuto-check passedTesting & QA

Install Coverage Analysis

skills CLI
$ npx skills add ccashwell/evm-cortex --skill coverage-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex coverage-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/coverage-analysis .claude/skills/coverage-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
coverage-analysis
GitHub stars
131
Token cost
~1.2k tokens
SKILL.md length
223 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements.

  • Works in 3 steps: Identify Gaps → Focus on Uncovered Branches → Common Untested Paths
  • Measuring test coverage for Solidity contracts
  • SKILL.md covers Running Coverage, LCOV Output for Visualization, Coverage Types and Filtering Coverage, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Coverage Analysis is an agent skill from ccashwell/evm-cortex. Use when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements. Covers forge coverage, lcov output, visualization, and coverage-driven testing.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test coverage and Smart contracts. It works with Solidity. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Measuring test coverage for Solidity contracts
  • Identifying untested code paths
  • Establishing coverage requirements

Example prompts

  • “/coverage-analysis”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Identify Gaps
  2. Focus on Uncovered Branches
  3. Common Untested Paths

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash, solidity, yaml and toml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Coverage Analysis loads about 1.2k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 223 words, ~1,193 tokens.

Download SKILL.mdSave it as .claude/skills/coverage-analysis/SKILL.md (or your agent's skills folder).
name
coverage-analysis
description
Use when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements. Covers forge coverage, lcov output, visualization, and coverage-driven testing.

Test Coverage Analysis

Running Coverage

bash
# Basic coverage report
forge coverage

# Output:
# | File               | % Lines         | % Statements    | % Branches      | % Functions     |
# |--------------------|-----------------|-----------------|-----------------|-----------------|
# | src/Vault.sol      | 92.31% (36/39)  | 89.47% (34/38)  | 75.00% (12/16)  | 100.00% (8/8)  |
# | src/Token.sol      | 100.00% (12/12) | 100.00% (10/10) | 100.00% (4/4)   | 100.00% (3/3)  |

LCOV Output for Visualization

bash
# Generate lcov.info
forge coverage --report lcov

# View in VS Code with "Coverage Gutters" extension
# Or generate HTML report:
genhtml lcov.info -o coverage-report --branch-coverage
open coverage-report/index.html

Coverage Types

TypeMeaningPriority
LineWas this line executed?Medium
StatementWas this statement executed?Medium
BranchWere both sides of if/else taken?High
FunctionWas this function called?Low

Branch coverage is the most important for security — untested branches are where bugs hide.

Filtering Coverage

bash
# Exclude test files and scripts
forge coverage --report lcov

# Filter the lcov output
lcov --remove lcov.info 'test/*' 'script/*' 'node_modules/*' \
     --output-file lcov-filtered.info

Coverage-Driven Testing Workflow

1. Identify Gaps
bash
# Generate and inspect coverage
forge coverage --report lcov
genhtml lcov.info -o coverage-report --branch-coverage
2. Focus on Uncovered Branches

For each uncovered branch, write a targeted test:

solidity
// If coverage shows this branch is untested:
//   if (amount > maxDeposit) revert ExceedsMax();

function test_depositExceedsMax() public {
    uint256 maxDeposit = vault.maxDeposit(address(this));
    vm.expectRevert(abi.encodeWithSelector(ExceedsMax.selector));
    vault.deposit(maxDeposit + 1, address(this));
}
3. Common Untested Paths
solidity
// Zero-amount edge cases
function test_depositZero() public {
    vm.expectRevert("zero amount");
    vault.deposit(0, address(this));
}

// Reentrancy guard activation
function test_reentrancyBlocked() public {
    attacker.setReentrancy(true);
    vm.expectRevert("ReentrancyGuard: reentrant call");
    attacker.attack();
}

// Overflow/underflow (checked math reverts)
function test_overflowReverts() public {
    vm.expectRevert();
    vault.deposit(type(uint256).max, address(this));
}

// Access control all roles
function test_onlyOwnerFunctions() public {
    vm.prank(nonOwner);
    vm.expectRevert();
    vault.setFee(100);
}

// Pause/unpause paths
function test_pausedDeposit() public {
    vault.pause();
    vm.expectRevert("Pausable: paused");
    vault.deposit(1 ether, address(this));
}

CI Integration

yaml
- name: Check coverage threshold
  run: |
    forge coverage --report summary | tee coverage.txt
    
    # Parse line coverage percentage
    COVERAGE=$(grep "| Total" coverage.txt | awk '{print $4}' | tr -d '%')
    
    if (( $(echo "$COVERAGE < 85" | bc -l) )); then
      echo "Coverage $COVERAGE% is below 85% threshold"
      exit 1
    fi

Coverage Report in foundry.toml

toml
[profile.default]
# Exclude from coverage analysis
no_match_coverage = "test|script|mock"

Coverage Targets by Component

ComponentMinimumTarget
Core protocol logic95% branch100% branch
Token contracts90% branch100% branch
Admin/governance85% branch95% branch
Periphery/helpers80% branch90% branch
View functions70% line85% line

Limitations

  • Coverage does not measure test quality — 100% coverage doesn't mean 100% correct
  • Foundry coverage doesn't handle inline assembly well
  • Branch coverage inside require() chains may not report correctly
  • Coverage overhead slows test execution (separate coverage CI step)
  • Unreachable code (dead branches) inflates uncovered percentage

Checklist

  • forge coverage runs in CI on every PR
  • LCOV report generated for visual inspection
  • Branch coverage prioritized over line coverage
  • Coverage threshold enforced (85%+ for core contracts)
  • Test and script files excluded from coverage stats
  • Uncovered branches documented as known gaps or addressed
  • Coverage report reviewed during audit preparation
  • New features include tests that maintain/improve coverage

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/coverage-analysis of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Coverage Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Coverage Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Coverage Analysis this skillccashwell/evm-cortex131—~1.2kAutomated safety check: PassMIT
Web3 Testingwshobson/agents40k11 repos~2kAutomated safety check: PassMIT
Audit PrepPlamenTSV/plamen303—~3.7kAutomated safety check: PassMIT
Mutation Testing Triagetrailofbits/skills7.4k—~3.2kAutomated safety check: PassCC-BY-SA-4.0
Property Based Testingtrailofbits/skills7.4k—~1.1kAutomated safety check: PassCC-BY-SA-4.0
Fizz Convertpashov/skills1.2k2 repos~3.7kAutomated safety check: PassMIT

Similar skills

  • Web3 Testing

    wshobson/agents

    Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.

    40k GitHub starsUsed in 11 repos~2k tokens
    Testing & QAAuto-check passed
  • Audit Prep

    PlamenTSV/plamen

    Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…

    303 GitHub stars~3.7k tokensUpdated 11 days ago
    SecurityAuto-check passed
  • Mutation Testing Triage

    trailofbits/skills

    Official

    Triages survived mutants and unnecessary test statements using Trailmark call-graph data, sorting them into false positives, missing unit tests and fuzzing targets.

    7.4k GitHub stars~3.2k tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Property Based Testing

    trailofbits/skills

    Official

    Writes, reviews, and debugs property-based tests — Hypothesis, fast-check, proptest, jqwik, rapid, and Echidna or Medusa for Solidity invariants.

    7.4k GitHub stars~1.1k tokensUpdated 5 days ago
    SecurityAuto-check passed
  • Fizz Convert

    pashov/skills

    Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes.

    1.2k GitHub starsUsed in 2 repos~3.7k tokens
    Backend & APIsAuto-check passed
  • Feynman Auditor

    0xiehnnkta/nemesis-auditor

    Deep business logic bug finder using the Feynman technique. An agent skill from 0xiehnnkta/nemesis-auditor.

    244 GitHub starsUsed in 1 repo~11k tokens
    Backend & APIsAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 8 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 8 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 8 days ago
    Auto-check passed

Works with

Questions about Coverage Analysis

What does Coverage Analysis do?

A skill your agent uses when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements. Coverage Analysis is an agent skill from ccashwell/evm-cortex. Use when measuring test coverage for Solidity contracts, identifying untested code paths, or establishing coverage requirements.

When should I use Coverage Analysis?

Coverage Analysis fits situations like: measuring test coverage for Solidity contracts; identifying untested code paths; establishing coverage requirements.

How do I install Coverage Analysis in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill coverage-analysis -a claude-code`. Or copy the skill folder (skills/coverage-analysis in ccashwell/evm-cortex) into .claude/skills/coverage-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Coverage Analysis in Codex?

Run `npx skills add ccashwell/evm-cortex --skill coverage-analysis -a codex`. Or copy the skill folder (skills/coverage-analysis in ccashwell/evm-cortex) into .agents/skills/coverage-analysis in your project. Codex loads it when a task matches its description.

Can I use Coverage Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill coverage-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/coverage-analysis, .gemini/skills/coverage-analysis, .github/skills/coverage-analysis and .opencode/skills/coverage-analysis in your project.

What does Coverage Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Coverage Analysis is instructions for the agent only.

Does Coverage Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Coverage Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Coverage Analysis use?

Coverage Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Coverage Analysis use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Coverage Analysis?

Skills that share tags, products or a category with Coverage Analysis: Web3 Testing (wshobson/agents, 40k stars), Audit Prep (PlamenTSV/plamen, 303 stars), Mutation Testing Triage (trailofbits/skills, 7.4k stars) and Property Based Testing (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Coverage Analysis?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.