Skip to content
Back to skills

Audit Correctness Proof

ASecurity

Attempt formal correctness proofs for all public cache methods

  • 17,959 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
documentationnode

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add ben-manes/caffeine --skill audit-correctness-proof --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Correctness Proof?

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

Security grade badge for Audit Correctness Proof
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ben-manes-audit-correctness-proof/badge)](https://www.skillsdirectory.com/skills/ben-manes-audit-correctness-proof)

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-correctness-proof
description: Attempt formal correctness proofs for all public cache methods
context: fork
agent: auditor
disable-model-invocation: true
---

Attempt to PROVE the correctness of the cache, not to find bugs.

For each public method (get, put, remove, compute, computeIfAbsent, merge,
replace, size, clear):

1. State the method's specification: preconditions, postconditions,
   concurrent behavior promises.
2. Identify the synchronization protocol ensuring the postcondition.
   For an expiring entry the clock is part of that state: place each
   ticker read that dates the entry or judges its expiry relative to the
   linearization point. A read taken before a step that can block (a
   hash-bin lock, a node monitor, a user callback) dates or judges
   against a stale clock, so check the paths that create an entry as
   well as the ones that test it.
3. Write a proof sketch:
   a. Assume the precondition holds
   b. Identify the critical section(s)
   c. Show the postcondition is established within the critical section
   d. Show no concurrent operation can invalidate it before the caller observes

4. If you CANNOT complete the proof at any step, stop and report:
   - Which step fails
   - What additional assumption would be needed
   - Whether the code guarantees that assumption

Gaps in the proof are more valuable than speculative bug reports — a gap
tells us exactly where to look.

Do not provide praise or style commentary.

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 documentation →

Comments

Loading comments…

Newsletter

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