no-fake-stats

May 11, 2026 · View on GitHub

tests License: Apache 2.0 Claude Code

A Claude Code Stop hook that blocks fabricated-looking statistics — specific decimal percentages, large dollar amounts in B/B/M, "% of users" claims — when no source citation appears in the same message.

no-fake-stats is one bash file (~80 lines, depends only on jq) wired into Claude Code's Stop and SubagentStop events. It pattern-matches three classes of statistics that look authoritative and require sourcing:

  • Decimal percentages73.4%, 19.9%, 91.7%. The decimal claims precision; precision needs a source.
  • <N>% of <noun> claims73% of users, 45% of enterprises. The noun-attached form is the single most common LLM stat-fabrication pattern.
  • Large dollar amounts$67.4 billion, $145M. Loud-sounding economic claims.
  • 4+-digit user/customer counts30000 developers, 12000 companies. (Comma-separated 30,000 is a known false negative; PRs welcome.)

Why this exists

LLM hallucination rates on numeric claims run 14–94% (2026 benchmark across 37 models).

Loose hedges ("approximately", "roughly", "around", "about") do not make a precise decimal honest. If the model writes "approximately 73.4%" — the decimal contradicts the hedge.

What gets blocked

A message containing any of the four trigger classes above without any of:

  • A URL (https://...) in the same message.
  • An academic citation: (YYYY) parenthetical year, <Author> et al., doi:, arXiv:.
  • An attribution: "according to ", "per ", "source: ".
  • A strong neutral hedge: unverified, unknown, insufficient_data, order of magnitude, "I do not have a verified figure here", "could be anywhere".

Install

mkdir -p .claude/hooks
curl -fsSL https://raw.githubusercontent.com/waitdeadai/no-fake-stats/main/no-fake-stats.sh \
  -o .claude/hooks/no-fake-stats.sh
chmod +x .claude/hooks/no-fake-stats.sh

Merge settings.example.json into .claude/settings.json. Requires jq.

Receipts

Four reproducible local tests in RECEIPTS.md. Four for four.

Sister tools

Part of the LLM Dark Patterns Hooks suite.

License

Apache-2.0.