Money Path Probe

    1

    Ten probes that find the billing bugs a code review cannot: the retry that double charges, the charge that fires before fulfilment, the spend cap that holds in sequence and fails in parallel.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    money-path-probe

    Example session with this skill installed

    Audit our new usage-based billing middleware. We use a custom Postgres meter and Stripe for payments. Start with the idempotency and budget cap probes.

    • Read your context and instructions
    • Compiled the money-path-probe

    Illustrative output. Request ids are placeholders; real ones come from your own sandbox run.

    Summary

    Ran 10 probes against the billing middleware in Stripe test mode. 8 passed, 2 failed. The budget cap failure is the one to fix first: it is a correctness bug in a control a customer explicitly relies on, and it only appears under concurrency.

    Findings

    F-1 - Budget caps do not hold under parallelism - Critical

    Probe 8, budget caps
    Request ids <from your run>

    Repro

    1. Set a hard cap of 10 units on a test account.
    2. Fire 12 single-unit requests concurrently, not in a loop with await.
    3. Read the committed total.

    Expected 10 accepted, 2 refused, total exactly 10.
    Actual 12 accepted, total 12. The cap read, compared and wrote without a lock, so every request saw the same pre-update value.
    Who loses money The operator, plus the customer who set the cap so this could not happen. A cap that does not hold is worse than no cap, because it was relied on.

    Fix direction The check is a read-modify-write. It needs a per-account lock or a compare-and-swap. An in-process mutex will look correct locally and do nothing across serverless instances.

    F-2 - Failed calls are metered after authorisation - High

    Probe 2, charge on failure
    Request ids <from your run>

    Repro

    1. Send a request that passes auth and fails downstream validation.
    2. Read the meter.

    Expected No charge, or an authorisation explicitly voided.
    Actual The meter incremented. It ticks in request middleware rather than on a successful response, so provider-side 5xx responses bill too.
    Who loses money The user pays for nothing. Small per call, and it compounds with every retry.

    Probe results

    #ProbeResultNote
    1IdempotencypassReplay returned the stored response, no second charge
    2Charge on failurefailF-2
    3Non-billable verbspassOPTIONS, HEAD and 304 all unbilled
    4Retry amplificationpassInterrupted call retried to one charge
    5Reported vs actualpassResponse totals matched the dashboard
    6Sub-unit roundingpassFloors consistently at call and invoice
    7Webhook signaturespassStale replay rejected on timestamp
    8Budget capsfailF-1
    9Revoked credentialspassRefused on the first call after revoke
    10ReconciliationpassPer-call sum matched the invoice

    Not tested

    Nothing was probed outside test mode. Probe 7 used only webhooks delivered to this account.

    Next steps

    F-1 is a vulnerability a third party can trigger, so report it privately rather than in a public issue. F-2 is an ordinary correctness bug and can go in a public issue with the repro above.

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

    About this skill

    Most billing bugs are not arithmetic. They need a second request to expose them, which is why they survive unit tests and code review and show up in a refund queue instead.

    This skill is a fixed battery of ten probes for anything that moves money or meters usage: a payments API, a usage meter, an agent spend cap, a webhook handler, a subscription flow. Each probe is one question with a yes or no answer and a one-line reproduction.

    What it covers: idempotent replay, charging on failure after authorisation, non-billable verbs (OPTIONS, HEAD, 304), retry amplification across a dropped connection, the amount a response reports against the amount actually billed, sub-unit rounding, webhook signature replay with a stale timestamp, spend caps under concurrency, revoked credentials served from cache, and per-call charges reconciled against the invoice.

    Every finding records one thing most bug reports leave out: who loses money when it is wrong, the operator or the user. "Retries double-bill, the user loses" is a refund queue. "Failed calls are not metered, you lose" is revenue leakage. Same defect class, different owner, different timeline.

    Includes the per-probe reference (exact repro, what correct behaviour looks like, the common wrong implementations, who absorbs the loss) and a findings report template that records the probes that passed as well as the ones that did not.

    Probe 3 comes from a real upstream fix: a CORS preflight billed as a payment (x402-foundation/x402 issue 3738). An OPTIONS request cannot carry a payment header, so the middleware read its absence as a fresh charge. Nothing in the test suite sent an OPTIONS.

    Test mode and your own accounts only. The skill states that boundary and holds to it.

    Requires sandbox access and test keys. Not a load testing tool. Only for authorized accounts. Concurrency testing limited to 12 parallel requests.

    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

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    • Free with an Agensi account

    Permissions

    Network Access
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    This skill is designed to detect non-obvious billing bugs such as race conditions, idempotency failures, and rounding errors that standard unit tests and simple arithmetic checks often miss.

    Yes, it is provider-agnostic and works with any billing API or gateway, including Stripe, Paddle, and internal custom metering solutions.

    You receive the complete auditing framework consisting of ten structured probes, a step-by-step implementation guide, and the report generation template for documenting findings.

    This skill is highly portable and compatible with most modern AI agents and developer environments capable of executing API requests and parsing JSON responses.

    Due to the nature of the concurrency and credential probes, this skill should only be executed against sandbox or staging environments to prevent accidental data corruption in production.

    While Probe 8 tests how your system handles parallel requests, it is designed to find logic errors in budget caps rather than performing high-volume stress or DDoS testing.

    New in APIs & Backend