Skills

Skill Coverage Audit

Trace codepaths in diffs, map against tests, auto-generate missing coverage, use...

Install

npx skills add nyldn/claude-octopus --skill skill-coverage-audit -g -a claude-code -y
Repository
nyldn/claude-octopus4.4k
Category
Testing
Updated
3d ago
License
MIT
Context cost
Mediumabout 2,229 tokens
Runs scripts
No, instructions only

What it does

Trace codepaths in diffs, map against tests, auto-generate missing coverage, use before shipping PRs

Test Coverage Audit

Artifact consistency before implementation

When invoked at a spec/plan/tasks boundary, use the feature boundary adapter rather than this skill's code-test generation mode. It automatically runs bounded deterministic checks for coverage, declared paths, stable IDs, explicit terminology/enums/counts and verified policy references. A single artifact skips analysis; a clean pass costs no seat. Reports are advisory and quote the original sources. Escalation uses at most one independent seat, and unavailable or failed semantic review leaves the deterministic results usable.

Overview

Trace every codepath in a diff, map each path against existing tests, visualize coverage gaps, and auto-generate tests for uncovered paths.

Core principle: Trace codepaths in changed files -> Map against existing tests -> Score coverage quality -> Generate tests for gaps -> Report before/after counts.


Caps and Limits

These hard limits prevent runaway analysis:

  • 30 code paths max per audit. If a diff yields more than 30, prioritize by complexity and risk (error paths, security-sensitive branches, public API surfaces first).
  • 20 tests generated max per audit. Focus on highest-impact gaps first.
  • 2-minute per-test exploration cap. If understanding a single test path takes longer than 2 minutes, mark it as "needs manual review" and move on.

Phase 1: Codepath Tracing

Step 1: Identify Changed Files

Determine the diff scope. Use the most relevant source:

# PR diff
git diff --name-only main...HEAD

# Staged changes
git diff --name-only --cached

# Last commit
git diff --name-only HEAD~1..HEAD

Filter to source code files only (exclude configs, docs, generated files).

Step 2: Trace Data Flow Through Every Branch

For each changed file, you MUST trace:

Read the whole SKILL.md on GitHub

More in Testing