benford

benford is a command for Claude Code from ololand-ai/ololand-plugins. It costs 24 tokens per session (489 once invoked), scanned A, original, Apache-2.0.

A forensic test of the first digits in general-ledger transactions, using Benford’s Law, a statistical pattern found in many natural datasets. Large departures can point to fabricated or selectively entered numbers.

In plain words
What is it for?
Use it to screen a deal’s ledger for suspicious numeric patterns and highlight account categories for follow-up.
Why use it?
It helps identify transaction data that may need investigation instead of treating unusual figures as ordinary accounting noise.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ololand-forensic-qoe plugin — 10 skills, 8 commands shipped together

Good fit Use it to screen a deal’s ledger for suspicious numeric patterns and…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ololand-ai/ololand-plugins/benford
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.

Clone the repo
git clone --depth 1 https://github.com/ololand-ai/ololand-plugins

Made for: Claude Code.

Or install ololand-forensic-qoe, the plugin that ships this one along with the rest of its 10 skills, 8 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 benford

README.md
[![agentmods](https://agentmods.dev/badge/commands/ololand-ai/ololand-plugins/benford.svg)](https://agentmods.dev/commands/ololand-ai/ololand-plugins/benford)
Your own site
<a href="https://agentmods.dev/commands/ololand-ai/ololand-plugins/benford"><img src="https://agentmods.dev/badge/commands/ololand-ai/ololand-plugins/benford.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 489 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00024 $0.00489
Opus 5 $0.00012 $0.00244
Sonnet 5 $0.00005 $0.00098
Haiku 4.5 $0.00002 $0.00049

Measured 3d ago against content hash 484ad88f86a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

benford 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 3d 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.

plugins/ololand-forensic-qoe/commands/benford.md · 49 lines

How it starts

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

Benford's Law

Benford's Law states that in many naturally-occurring datasets, the leading digit follows a logarithmic distribution: ~30% start with 1, ~17% with 2, etc. Significant deviation from this distribution is a classic forensic indicator of fabricated or selectively-entered transactions.

Usage

/benford <deal_id>

Arguments

  • deal_id (required) — The deal whose GL transactions to test. Requires uploaded GL export with at least 1,000 line items for statistical validity.

Execution

  1. If the user supplied a transaction list or GL file, parse it into transaction dictionaries and call run_benford(transactions). If the user supplied only deal_id, call analyze_forensic_qoe(deal_id) and extract the Benford section from the full battery. Do not pass a primitives argument.
  2. The engine pulls all GL transactions from the deal's data room (or from forensic_extraction_service if extraction has been run).
  3. Computes observed first-digit distribution and compares to Benford expected via χ² goodness-of-fit and Mean Absolute Deviation (MAD).
  4. Flags account categories with the most significant deviations.

Interpretation

  • MAD < 0.012 — close conformity (green)
  • 0.012 ≤ MAD < 0.015 — acceptable conformity (yellow)
  • MAD ≥ 0.015 — non-conformity (red — investigate the high-deviation accounts)

Output

For each account category that deviates significantly from Benford expected:

  • Observed vs. expected first-digit distribution (table + chart)
  • χ² statistic and p-value
  • Top transactions contributing to the deviation
  • Suggested follow-up: which specific journal entries to examine

Why this matters

Benford's Law is the deterministic statistical test most commonly cited in fraud forensics literature. It cannot be evaded by altering totals — it operates on the digit-level distribution of every transaction. Pre-LOI screening with Benford catches the deals where journal entries have been manipulated before you commit to fieldwork.

Read the full file on GitHub · 49 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. 3d ago First seen · 49 lines · 24 tokens per session scan A 484ad88f86a4

Subscribe to this mod's changes

benford is a command published in the GitHub repository ololand-ai/ololand-plugins (0 stars, last pushed 2d ago), licensed Apache-2.0. It adds 24 tokens to every session and 489 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-09-03.