nyldn/claude-octopus/skill-coverage-audit
Claude Code and agent skill by nyldn/claude-octopus
- community
Checking that the SKILL.md file is still in the repository.
Trace codepaths in diffs, map against tests, auto-generate missing coverage — use before shipping PRs
Install
npx vskill@latest install nyldn/claude-octopus/skill-coverage-auditSKILL.md
The same SKILL.md was published earlier as nyldn/claude-octopus/skill-coverage-audit.
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:
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:
- Conditionals -- Every
if/else,switch/case, ternary, and pattern match. Each branch is a separate codepath. - Error paths -- Every
catch,throw, error return, validation failure, and early return with error. WHY: Error paths are the most common source of untested bugs. - Function calls -- Every function invoked from changed code. Trace one level deep into callees to identify integration boundaries.
- Loop boundaries -- Empty collection, single item, and multi-item paths through loops.
- Guard clauses -- Every early return, null check, and permission gate.
Step 3: Build the Codepath Inventory
Produce a structured inventory:
Type categories: conditional, error, guard, loop-boundary, integration, async
Risk assessment: high = user-facing failure or data loss, medium = degraded behavior, low = cosmetic or logging
Phase 2: Test Mapping and Quality Scoring
Step 1: Search for Existing Tests
For each file in the diff, search the test directory for related tests:
Step 2: Score Test Quality
For each codepath, assess existing test coverage with this rubric:
| Rating | Meaning | Criteria | |
|---|---|---|---|
| ★★★ | Behavior + edge cases tested | Tests assert behavior AND cover boundary conditions, error cases, and edge inputs | |
| ★★ | Happy path tested | Tests cover the success path but miss error branches or edge cases | |
| ★ | Smoke test only | Test exists but only checks the function runs without error (no meaningful assertions) | |
| ☆ | No test found | No test references this codepath at all |
Step 3: Produce Coverage Map
Map each codepath to its test coverage:
Phase 3: Coverage Diagram
After completing the map, produce an ASCII coverage summary. This is the primary output artifact.
Break down by category:
Use full block for covered and light shade for uncovered. 10-character bar. Always show exact fractions and percentages.
Phase 4: Auto-Generate Tests
Step 1: Detect Project Test Conventions
Before generating any tests, you MUST detect the project's testing patterns:
Step 2: Generate Tests for Uncovered Paths
For each no-test and smoke-only codepath, generate a test that:
- Follows project naming conventions -- same directory structure, same file naming pattern
- Uses existing test helpers -- import from the same test utilities the project already uses
- Tests behavior, not implementation -- assert observable outcomes, not internal state
- Covers the specific gap -- targets the exact branch or error path identified in Phase 1
- Includes edge cases -- aim for full coverage on each generated test
Step 3: Present Generated Tests
For each generated test, show:
Step 4: Report Before/After
After generating all tests, show the coverage change:
Integration with Other Skills
With flow-deliver / skill-code-review
Coverage audit runs as a complement to code review. When invoked during deliver phase:
- Code review assesses quality and correctness
- Coverage audit assesses test completeness
- Both feed into the ship/no-ship decision
With skill-tdd
If coverage audit finds gaps in new code, recommend the user adopt TDD for the next iteration. Coverage audit fixes existing gaps; TDD prevents future ones.
With skill-verification-gate
After generating tests, use skill-verification-gate to run the test suite and confirm the new tests pass.
Red Flags -- Do Not Do This
| Action | Why It Is Wrong | |
|---|---|---|
| Count lines instead of paths | Line coverage misses branch coverage entirely | |
| Generate tests without checking conventions | Tests that do not match project style will be rejected | |
| Test implementation details | Brittle tests that break on refactoring | |
| Skip error paths | Error paths are where most bugs live | |
| Exceed the 30-path cap | Analysis becomes unfocused and slow | |
| Generate more than 20 tests | Diminishing returns; focus on highest impact | |
| Spend more than 2 min on one path | Mark as needs-manual-review and move on |
Quick Reference
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skill-coverage-audit/SKILL.md
Popularity
- Repository stars
- 4,448
- Repository forks
- 420
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nyldn/claude-octopus/skill-coverage-audit)