account-research
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect…
\"Apply Benford's Law to detect anomalies in numerical datasets by analyzing first-digit frequency distributions. Use this skill when the user needs to audit financial data for fraud indicators, validate data integrity, or detect fabricated numbers — even if they say 'data
Claude Code
$ npx -y skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford --agent claude-code
Codex
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a codex -y
Cursor
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a cursor -y
Gemini CLI
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a gemini-cli -y
GitHub Copilot
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a github-copilot -y
OpenCode
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a opencode -y
Windsurf
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-risk-benford -a windsurf -y
name: "\"algo-risk-benford\"" description: "\"Apply Benford's Law to detect anomalies in numerical datasets by analyzing first-digit frequency distributions. Use this skill when the user needs to audit financial data for fraud indicators, validate data integrity, or detect fabricated numbers — even if they say 'data manipulation detection', 'first digit test', or 'accounting fraud screening'.\"." allowed-tools: Read, Glob, Grep
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).
**Trigger conditions:**
**When NOT to use:**
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.
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.
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
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.
Return conformity assessment with digit-level analysis.
{
"conformity": "marginal",
"mad": 0.013,
"chi_squared": {"statistic": 18.5, "p_value": 0.018, "df": 8},
"digit_analysis": [{"digit": 1, "observed_pct": 25.1, "expected_pct": 30.1, "deviation": -5.0}],
"metadata": {"records": 5000, "dataset": "Q4 expense reports"}
}**Input:** 1000 invoice amounts from a company's AP ledger **Expected:** First digits should approximate 30.1%, 17.6%, 12.5%, 9.7%, 7.9%, 6.7%, 5.8%, 5.1%, 4.6%. MAD < 0.012 for legitimate data.
| Input | Expected | Why | |-------|----------|-----| | All amounts $90-$99 | Digit 9 dominates | Constrained range — Benford's doesn't apply | | Round number spike (digit 1, 5) | Flag for review | May indicate round-number estimation or threshold manipulation | | Government budget data | Typically conforms well | Large naturally-occurring financial datasets fit Benford's |
Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect…
Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when…
Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining…
\"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the…
\"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to…
\"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.