"algo-risk-benford"

"algo-risk-benford" is a skill for Claude Code from charlieviettq/awesome-agent-skill. It costs 71 tokens per session (1,085 once invoked), scanned A, a copy of algo-risk-benford, MIT.

An analysis that compares the first digits of numbers with Benford's Law, a pattern often found in naturally occurring data. It can reveal unusual patterns, but it is not suitable for IDs, percentages, narrow ranges, or small datasets.

In plain words
What is it for?
Use it to screen financial records, invoices, tax data, or other large numerical datasets for suspicious first-digit patterns.
Why use it?
It gives an initial check for possible data manipulation or integrity problems without treating every unusual result as fraud.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to screen financial records, invoices, tax data, or other large numerical datasets for suspicious first-digit patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/charlieviettq/awesome-agent-skill/algo-risk-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.

Any agent
npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford
Clone the repo
git clone --depth 1 https://github.com/charlieviettq/awesome-agent-skill

Made for: Claude Code.

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 "algo-risk-benford"

README.md
[![agentmods](https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-benford/github.svg)](https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-benford)
Your own site
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-benford"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-benford/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for "algo-risk-benford"

Your own site · 80×15
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-benford"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-benford.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,085 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 94% copy Near-identical to another mod 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.00071 $0.01085
Opus 5 $0.00036 $0.00543
Sonnet 5 $0.00014 $0.00217
Haiku 4.5 $0.00007 $0.00109

Measured 12d ago against content hash 9c5009192f8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

"algo-risk-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 12d 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.

Origin

This is a copy

94% identical to algo-risk-benford — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/algo-risk-benford/SKILL.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.

Benford's Law Analysis

Overview

Benford's Law predicts that in naturally occurring datasets, the leading digit d appears with probability P(d) = log₁₀(1 + 1/d). Digit 1 appears ~30.1% of the time, digit 9 only ~4.6%. Deviations from this distribution may indicate data fabrication or manipulation. Analysis runs in O(n).

When to Use

Trigger conditions:

  • Auditing financial data (expenses, invoices, tax returns) for manipulation
  • Screening large datasets for data integrity issues
  • Detecting fabricated or artificially rounded numbers

When NOT to use:

  • For assigned/sequential numbers (zip codes, phone numbers, IDs)
  • For datasets with constrained ranges (e.g., human ages, percentages)
  • For small datasets (< 500 records — insufficient statistical power)

Algorithm

IRON LAW: Benford's Law Applies to NATURALLY OCCURRING Data Spanning Orders of Magnitude
Data that doesn't span multiple orders of magnitude (e.g., temperatures
in Celsius, human heights) will NOT follow Benford's Law. Deviation from
Benford's in such data is EXPECTED, not suspicious. Always verify the
data type is appropriate before concluding fraud.

Phase 1: Input Validation

Extract leading digits from dataset. Filter: remove zeros, negatives (take absolute value), values < 10. Verify dataset spans multiple orders of magnitude. Gate: 500+ records, data spans at least 2 orders of magnitude.

Phase 2: Core Algorithm

  1. Extract first digit of each number
  2. Count frequency of each digit (1-9)
  3. Compare observed frequencies against Benford's expected: P(d) = log₁₀(1 + 1/d)
  4. Statistical tests: chi-squared test, MAD (Mean Absolute Deviation), KS test

Phase 3: Verification

MAD thresholds: < 0.006 (close conformity), 0.006-0.012 (acceptable), 0.012-0.015 (marginal), > 0.015 (non-conforming). Flag specific digits with large deviations. Gate: MAD computed, non-conforming digits identified.

Phase 4: Output

Return conformity assessment with digit-level analysis.

Read the full file on GitHub · 89 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 89 lines · 71 tokens per session scan A 9c5009192f8c

Subscribe to this mod's changes

"algo-risk-benford" is a skill published in the GitHub repository charlieviettq/awesome-agent-skill (25 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 1,085 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to algo-risk-benford, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

cwicr-cost-calculator

Calculate construction costs using DDC CWICR resource-based methodology. Break down costs into labor, materials, equipment with transparent pricing.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 33 tokens

cwicr-risk-calculator

Calculate risk-adjusted cost estimates using CWICR data. Apply contingencies, Monte Carlo simulation, and probability distributions to cost estimates.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 34 tokens

bim-cost-estimation-cwicr

Automated cost estimation from BIM models using DDC CWICR database (8 national bases, 78,228 positions). AI classification + vector search for accurate pricing.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 43 tokens

historical-cost-analyzer

Analyze historical construction costs for benchmarking, trend analysis, and estimating calibration. Compare projects, track escalation, identify patterns.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 29 tokens

unit-price-database-manager

Manage construction unit price databases: update prices, track vendors, apply location factors, maintain historical records. Essential for accurate estimating.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 31 tokens

cashflow-forecaster

Forecast construction project cash flow. Project income and expenses, identify funding gaps, and optimize payment timing for improved financial management.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens