Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Ledger Correctness Kit: prove money moves exactly once

    1

    A drop-in property-based and concurrency test suite for payments, wallets and credits. Every race test fails on a ledger with that bug and passes on a correct one.

    $24

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Ledger Correctness Kit: prove money moves exactly once

    Ledger Correctness Kit: prove money moves exactly once

    Example session with this skill installed

    Prove our ledger can't double-charge or overdraw under concurrent retries.

    • Read your context and instructions
    • Compiled the ledger correctness kit

    I wired the kit's adapter to the ledger's service layer and ran it against a file-backed database.

    $ python -m pytest tests/test_ledger_kit.py -q
    FAILED test_concurrent_duplicate_key_posts_once
      AssertionError: one idempotency key produced several transfers
    FAILED test_overdraft_race_cannot_breach_floor
      AssertionError: 16 transfers of 60 succeeded from a balance of 100
    2 failed, 2 passed, 1 skipped
    

    Verdict: LEDGER: AT RISK

    FindingRoot causeFix
    Duplicate retries post twicethe idempotency key is checked, then inserted, in separate stepsclaim the key with a unique-constraint insert inside the write transaction
    Overdraft racethe balance check runs outside the lockread the balance and write both postings under one lock

    The property-based model (random transfers, replays, refusals) passed: single-threaded logic is correct; the defects are concurrency only. Re-run after the fixes to get LEDGER: SOUND.

    (Run against the kit's deliberately broken demo ledger, trimmed.)

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A retried request charges twice. Two transfers both pass the balance check. A lock timeout becomes a 500. Your unit tests pass through all of it.

    Every concurrency test in this kit was checked against a deliberately broken ledger with the exact bug it names: it fails there and passes on a correct one.

    Write one adapter (about 60 lines for SQLite) and the suite proves, against your real database:

    • the books always close and balances equal the sum of postings
    • an idempotency key posts once under 16 concurrent retries
    • no update is lost and no overdraft race wins
    • lock contention returns a typed 503, never a raw driver error (500)

    Is it for my stack? The suite is Python (pytest + Hypothesis) and runs against any ledger you can call from Python: your service layer or your HTTP API. For JS/TS, Java, Go and Rust you get porting notes for fast-check, jqwik, rapid and proptest.

    Also inside

    • Design mode: 8 design rules mapped to SQLite, Postgres and MySQL, and a Postgres reference schema with immutable postings.
    • Review mode: a checklist that ends in LEDGER: SOUND or LEDGER: AT RISK, every flag backed by a test.
    • Crash-test recipe: kill the process between the two postings and prove nothing half-happened.

    From the author of agent-forge, whose agent-built payments ledger is public with its full history (github.com/Ces107/agent-forge).

    Launch price $24 until 3 November 2026, then $29.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scanned

    Verified clean today

    • Passed all security checks, Safe to install

    Requires

    Python

    Listedtoday

    What's inside

    Frequently Asked Questions