Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Agent Spend Ledger Audit

    1

    This skill redoes the arithmetic from the cap, row by row, and shows you where the claimed numbers and the real numbers part ways.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Agent Spend Ledger Audit

    Agent Spend Ledger Audit

    Example session with this skill installed

    Our three-agent research run had a $100 budget and the publisher agent says it finished with exactly $0.00 left. Here's the spend log as ledger.json. Check it before I top it up.

    • Read your context and instructions
    • Compiled the agent spend ledger

    I ran agent-spend-audit with --cap 100 on ledger.json. Verdict: FAIL (exit code 1), five violations.

    {
      "cap": 100,
      "startSeq": 1,
      "verdict": "FAIL",
      "violations": [
        { "index": 2, "seq": 3, "message": "balance mismatch: claimed 35.35, recomputed 34.35" },
        { "index": 3, "seq": 5, "message": "sequence break: expected seq 4, found 5" },
        { "index": 3, "seq": 5, "message": "balance mismatch: claimed 19.35, recomputed 16.35" },
        { "index": 4, "seq": 6, "message": "cap exceeded: recomputed balance -8.64 is below zero" },
        { "index": 4, "seq": 6, "message": "balance mismatch: claimed 0.00, recomputed -8.64" }
      ],
      "rows (trimmed)": [
        { "seq": 3, "actor": "writer-agent", "action": "draft report", "cost": 22.1,
          "claimedBalance": 35.35, "recomputedBalance": 34.35,
          "flags": { "capExceeded": false, "balanceMismatch": true, "seqBreak": false } },
        { "seq": 6, "actor": "publisher-agent", "action": "bulk email send", "cost": 24.99,
          "claimedBalance": 0, "recomputedBalance": -8.64,
          "flags": { "capExceeded": true, "balanceMismatch": true, "seqBreak": false } }
      ],
      "totalSpent": 108.64,
      "finalBalance": -8.64,
      "fingerprintSha256": "26879e711731306125f26c0ec3a5225e8e3c3e02e5cd29e10817511abae39ac2"
    }
    

    What happened

    1. The writer agent's balance after row 3 is $1.00 too high (claimed 35.35, should be 34.35).
    2. Entry seq 4 is missing from the log, so something may have been spent and not recorded.
    3. The run spent $108.64 against a $100 cap. The last step went $8.64 over, but the log claims $0.00 left.
      I wouldn't top up until the missing seq 4 entry is found and the writer agent's maths is fixed.
    I ran agent-spend-audit with --cap 100 on ledger.json

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

    About this skill

    Agent Trust: check the bill before you approve more budget

    When agents spend money on API calls, tools or services, they often keep their own running balance. This skill redoes the arithmetic from the cap, row by row, and shows you where the claimed numbers and the real numbers part ways.

    What it does

    Given a budget cap and a JSON ledger of {seq, actor, action, cost, balance} entries, it:

    • Recomputes the running balance for every row in integer cents
    • Flags balance mismatches (claimed vs recomputed)
    • Flags sequence breaks (a skipped or repeated seq, which can mean a missing entry)
    • Flags cap exceeded (recomputed balance below zero)
    • Checks that every row has the required fields and sensible types

    When an agent should use it

    • An agent reports what it spent and you want it checked
    • Before approving more budget for a multi-agent run
    • Reviewing any append-only cost log where balances should add up

    What it outputs

    JSON: verdict, a list of violations (row index, seq, message), every row with claimed vs recomputed balance and flags, total spent, final balance, and a SHA-256 fingerprint over the inputs and verdict. Exit 0 = PASS; 1 = FAIL. The skill tells the agent to show claimed vs recomputed values, never to "correct" the ledger silently.

    Limitations

    • It checks the arithmetic and sequence of the ledger you give it. It can't know about spend that was never logged, though a sequence break is often a sign of one.
    • One currency per ledger; amounts are treated as decimal units with two places (cents).
    • You need to convert other log formats to the JSON shape first.

    Open source, packaged skill

    Original work by Simon Gant. The core logic is public under the MIT licence (kar-tally). This listing is the packaged, tested agent skill: SKILL.md workflow, CLI, receipt output and docs. Requires Node.js 18+, zero dependencies, no network, no API keys.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by 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 scan

    Security scan passed today

    Requires

    Node.js 18+
    Node.js

    Permissions

    Runs one local Node.js script (`node scripts/agent-spend-audit.js`) through the agent's shell tool. Reads only the ledger file you pass it. No network access, no file writes, no environment variables read. Pure compute.

    Listedtoday

    What's inside

    Frequently Asked Questions

    No. It only checks the ledger file you give it, offline.

    Floating-point maths drifts on long ledgers (0.1 + 0.2 isn't exactly 0.3). Working in cents keeps every recomputed balance exact to two decimal places.

    A `seq` number was skipped or repeated. Often that means an entry is missing from the log, so it's worth finding before you trust the totals.

    Yes, if you log them in the same shape. It treats amounts as two-decimal units, so whole-number token counts work too.

    The core logic is MIT open source. You are paying for the packaged, tested agent skill and workflow.

    New in LLM Ops