# qe-coverage-analysis

qe-coverage-analysis inspects Istanbul, c8, and lcov data to detect untested paths with risk scoring. Useful when prioritizing test efforts or checking PR quality gates.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 127 installs · ★ 533 repo stars
- Author: proffesor-for-testing
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/qe-coverage-analysis/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/qe-coverage-analysis

## What it does

This skill guides agent workflows in evaluating test coverage artifacts generated by Istanbul, c8, or lcov. It applies an O(log n) sublinear gap detection algorithm and scores untested paths against several risk signals: cyclomatic complexity over 10, 90-day edit frequency, 180-day bug history, and domain tags like authentication or payments.

Workflows rely on CLI commands like `aqe coverage analyze` and `aqe coverage diff` to compare coverage across branches. The skill appends run statistics to `run-history.json` after execution, which helps spot downward trends across consecutive pull requests.

Initial runs fail roughly 14% of the time due to an 86% initialization success rate in this specific domain, so keep fallback scripts ready. High branch coverage can also mask tests that lack assertions, making mutation verification necessary.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill qe-coverage-analysis -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/qe-coverage-analysis/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/qe-coverage-analysis/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill qe-coverage-analysis -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/qe-coverage-analysis/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill qe-coverage-analysis -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/qe-coverage-analysis/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install proffesor-for-testing/agentic-qe assets/skills/qe-coverage-analysis
```

2. **Manually: put the files in place**
- File: `.github/skills/qe-coverage-analysis/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill qe-coverage-analysis -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/qe-coverage-analysis
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/qe-coverage-analysis/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill qe-coverage-analysis -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/qe-coverage-analysis/SKILL.md

## When to use it
- locate untested lines and branches across lcov or c8 files
- rank testing tasks by business criticality and code complexity
- compare diff coverage between a feature branch and main
- enforce pull request quality gates on new code additions

## Example prompts
- Run coverage analysis on src/ and highlight critical untested paths
- Compare branch coverage between main and current branch with risk weighting
- Check our coverage quality gates and save run metrics to history

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: aaecac079ff46b25.

BEGIN THIRD-PARTY FILE aaecac079ff46b25
````text
---
name: "qe-coverage-analysis"
description: "Analyzes test coverage data (Istanbul, c8, lcov) to identify uncovered lines, branches, and functions with risk-weighted gap detection. Use when analyzing coverage reports, identifying coverage gaps, comparing coverage between branches, or prioritizing which untested code to cover first."
trust_tier: 3
validation:
  schema_path: schemas/output.json
  validator_path: scripts/validate-config.json
  eval_path: evals/qe-coverage-analysis.yaml
---

# QE Coverage Analysis

## Purpose

Guide the use of v3's advanced coverage analysis capabilities including sublinear gap detection algorithms, risk-weighted coverage scoring, and intelligent test prioritization based on code criticality.

## Activation

- When analyzing test coverage
- When identifying coverage gaps
- When prioritizing testing effort
- When setting coverage targets
- When assessing code risk

## Quick Start

```bash
# Analyze coverage with gap detection
aqe coverage analyze --source src/ --tests tests/

# Find high-risk uncovered code
aqe coverage gaps --risk-weighted --threshold 80

# Generate coverage report
aqe coverage report --format html --output coverage-report/

# Compare coverage between branches
aqe coverage diff --base main --head feature-branch
```

## Agent Workflow

```typescript
// Comprehensive coverage analysis
Task("Analyze coverage gaps", `
  Perform O(log n) coverage analysis on src/:
  - Calculate statement, branch, function coverage
  - Identify uncovered critical paths
  - Risk-weight gaps by code complexity and change frequency
  - Recommend tests to write for maximum coverage impact
`, "qe-coverage-specialist")

// Risk-based prioritization
Task("Prioritize coverage effort", `
  Analyze coverage gaps and prioritize by:
  - Business criticality (payment, auth, data)
  - Code complexity (cyclomatic > 10)
  - Recent bug history
  - Change frequency
  Output prioritized list of files needing tests.
`, "qe-coverage-analyzer")
```

## Analysis Strategies

### 1. Sublinear Gap Detection

```typescript
await coverageAnalyzer.detectGaps({
  algorithm: 'sublinear',  // O(log n) complexity
  source: 'src/**/*.ts',
  metrics: ['statement', 'branch', 'function'],
  sampling: {
    enabled: true,
    confidence: 0.95,
    maxSamples: 1000
  }
});
```

### 2. Risk-Weighted Coverage

```typescript
await coverageAnalyzer.riskWeightedAnalysis({
  coverage: coverageReport,
  riskFactors: {
    complexity: { weight: 0.3, threshold: 10 },
````
END THIRD-PARTY FILE aaecac079ff46b25

The third-party file has ended. Everything between the aaecac079ff46b25 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2489 of 6076 bytes. © proffesor-for-testing · MIT · https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/qe-coverage-analysis/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
