Skip to content
Back to skills

Audit Coverage Gaps

ASecurity

Discover test coverage gaps that could hide correctness defects

  • 17,959 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 7, 2026
testing

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add ben-manes/caffeine --skill audit-coverage-gaps --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Coverage Gaps?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Audit Coverage Gaps
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ben-manes-audit-coverage-gaps/badge)](https://www.skillsdirectory.com/skills/ben-manes-audit-coverage-gaps)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: audit-coverage-gaps
description: Discover test coverage gaps that could hide correctness defects
context: fork
agent: auditor
disable-model-invocation: true
---

Assume the existing tests miss at least one real defect.

1. For each public method, identify the hardest-to-test edge cases:
   - Null values (where permitted)
   - Maximum/minimum weight
   - Zero-duration expiration
   - Mapping functions that return the same instance
   - Mapping functions that throw
   - Weighers that throw
   - Expiry callbacks that throw
   - CompletableFuture values (async cache edge cases)
   - Keys/values with adversarial hashCode/equals

2. For each edge case, trace the code path. Does the code handle it correctly?

3. Identify combinatorially hard behavioral dimensions:
   - Operation A on expired entry during concurrent operation B
   - Exception in user callback X while holding lock Y
   - GC collecting reference R between code points P and Q
   - Fast path falls through to slow path under contention (e.g.,
     entry appears expired on fast path, recovers under lock on slow path)
   - Async cache: future completes between check and action (e.g.,
     isComputingAsync returns true, but future completes before
     the code that depends on that check executes)

4. For each candidate gap, provide a minimal test case with the specific
   cache configuration and thread interleaving needed to reach the code path.

Priority ordering:
- Paths involving the catch-commit-rethrow pattern (doComputeIfAbsent, remap)
- Slow paths reachable only via contention (synchronized blocks after optimistic checks)
- Interactions between expiration and the async value lifecycle (ASYNC_EXPIRY, isComputingAsync)

Focus only on behavioral coverage gaps that could hide correctness bugs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.