skill-coverage-audit

Featured

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

AI & Automation 3,887 stars 365 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Coverage Audit ## 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: ```bash # 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: 1. **Conditionals** -- Every `if/else`, `switch/case`, ternary, and pattern match. Each branch is a separate codepath. 2. **Error paths** -- Every `catch`, `throw`, error return, validation failure, and early return with error. WHY: Error...

Details

Author
nyldn
Repository
nyldn/claude-octopus
Created
6 months ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category