audit

audit is a command for coding agents from esbmc/agent-marketplace. It costs 15 tokens per session (991 once invoked), scanned A, original, MIT.

A command that uses ESBMC, a tool that checks program behavior against possible bugs, to audit one source file for security problems.

In plain words
What is it for?
It examines C, C++, Python, or Solidity files, detects features such as loops and concurrency, selects an available solver, and runs several verification checks.
Why use it?
It checks more systematically than a quick code review and stops with setup guidance if ESBMC or a suitable solver is unavailable.

Command

Part of the esbmc-plugin plugin — 1 skill, 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/esbmc/agent-marketplace/audit
Clone the repo
git clone --depth 1 https://github.com/esbmc/agent-marketplace

Or install esbmc-plugin, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/esbmc/agent-marketplace/audit.svg)](https://agentmods.dev/commands/esbmc/agent-marketplace/audit)
Your own site
<a href="https://agentmods.dev/commands/esbmc/agent-marketplace/audit"><img src="https://agentmods.dev/badge/commands/esbmc/agent-marketplace/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 991 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00991
Opus 5 $0.00008 $0.00495
Sonnet 5 $0.00003 $0.00198
Haiku 4.5 $0.00002 $0.00099

Measured 5d ago against content hash 19b3c83ad07e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

esbmc-plugin/commands/audit.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ESBMC Security Audit Command

Perform a comprehensive security audit using multiple ESBMC verification passes run concurrently.

Instructions

  1. Check that ESBMC is installed by running which esbmc. If not found, stop and tell the user:

  2. Read the source file to understand its structure and detect:

    • Language (C, C++, Python, Solidity)
    • Presence of concurrency (pthreads, std::thread, threading module)
    • Complexity indicators (loops, recursion, dynamic allocation)
  3. Solver detection — run esbmc --list-solvers and select the best available solver using this priority order: Boolector → Bitwuzla → Z3. Use the corresponding flag: --boolector, --bitwuzla, or --z3. Store this as <solver-flag>. If none of these solvers are listed as available, stop and tell the user that ESBMC is built without solver support, and direct them to build ESBMC with solver support: https://github.com/esbmc/esbmc

  4. Loop discovery — run esbmc <file> --show-loops to list all loops. Choose the unwind strategy:

    • No loops found → no unwind flag needed
    • Loops with bounds apparent from the source → use --unwindset L1:N,... with per-loop bounds derived from the source
    • Loops with unknown or dynamic bounds → use --incremental-bmc

    Store the resulting unwind flag(s) as <unwind-strategy>.

  5. Spawn parallel subagents using the Task tool (subagent_type: general-purpose), one per pass. Launch all subagents in a single message so they execute concurrently. Each subagent receives: the file path, <solver-flag>, <unwind-strategy>, and its specific checks.

    Subagent Checks Command
    A: Default properties (none — covers bounds, ptr safety, div-by-zero) esbmc <file> <solver-flag> <unwind-strategy> --timeout 60s
    B: Memory safety --memory-leak-check esbmc <file> <solver-flag> <unwind-strategy> --memory-leak-check --timeout 60s
    C: Integer safety --overflow-check --unsigned-overflow-check esbmc <file> <solver-flag> <unwind-strategy> --overflow-check --unsigned-overflow-check --timeout 60s
    D: UB shifts --ub-shift-check esbmc <file> <solver-flag> <unwind-strategy> --ub-shift-check --timeout 60s
    E: Concurrency (only if threads detected in step 2) --deadlock-check --data-races-check --context-bound 2 esbmc <file> <solver-flag> <unwind-strategy> --deadlock-check --data-races-check --context-bound 2 --timeout 60s

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 89 lines · 15 tokens per session scan A 19b3c83ad07e

Subscribe to this mod's changes

audit is a command published in the GitHub repository esbmc/agent-marketplace (4 stars, last pushed 6mo ago), licensed MIT. It adds 15 tokens to every session and 991 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.