anomaly-fraud-scanner
БесплатноБез исполняемых скриптовНе проверенScans transactions for fraud and anomaly signals — duplicate charges within 48 hours, transactions more than 3 standard deviations above a merchant's…
от lyndonkl★ 208 звёзд на GitHubОб этом скилле
Anomaly Fraud Scanner
Table of Contents
Overview
Fraud detection on a household budget is a different problem from fraud detection at a bank. The bank already runs sophisticated rules; this skill exists to catch what the bank misses — small recurring fraud below their threshold, unfamiliar merchant patterns, and post-hoc audit of charges the user has not yet noticed.
It runs five complementary detectors, each producing severity-tagged alerts.
Input contract
The caller provides:
transactions_new— transactions added by the most recent drop.transactions_history— last 12 months of confirmed transactions.accounts— for context (account type, owner, geography).today— ISO date.thresholds— optional overrides:{ "duplicate_window_hours": 48, "anomaly_sigma": 3.0, "first_merchant_high_dollar_cents": 50000, "geo_radius_miles": 1000 }
Detection rules
Rule 1 — Duplicate within 48 hours
Two transactions on the same account_id with the same merchant and the same amount_cents posted within duplicate_window_hours of each other.
- Severity:
mediumfor amounts < $200,highfor amounts ≥ $200. - Common false positives: two coffees in a day, two gas-station fill-ups during a road trip — exclude
food.coffee,food.restaurants,transportation.gasfrom this rule when amount is below $30.
Rule 2 — Statistical anomaly
For each (merchant, account_id) pair with ≥ 6 historical occurrences, compute mean and stddev. Flag any new transaction where |amount − mean| > anomaly_sigma × stddev AND |amount − mean| ≥ $50.
- Severity:
mediumbaseline,highif> 5σor amount > 4× mean. - Common false positives: tip variations on restaurants, surge pricing on rideshare — bake a 25% leniency on
food.restaurantsandtransportation.rideshare.
Rule 3 — First merchant high dollar
A transaction with a merchant that has zero prior occurrences in transactions_history AND |amount| ≥ first_merchant_high_dollar_cents.
- Severity:
mediumfor $500–$2,000,highfor ≥ $2,000. - Common false positives: a planned major purchase (appliance, travel booking). Suppress when a recent
category_overrideor user-confirmed plan exists.
Rule 4 — Geography or time anomaly
If description_raw includes a location string (state code, country code) and the inferred location differs by more than geo_radius_miles from the household's home location AND no travel context is set, flag.
If a transaction posts at an unusual time (between 2am–5am local) AND the merchant category is unusual for that hour (not gas station, not 24-hour pharmacy), flag.
- Severity:
medium. - This rule is noisy — use only when a location/time signal is clearly present.
Rule 5 — Unexpected fee
Any transaction with category: financial.fees is captured. Tag with fee_type (overdraft, foreign-transaction, monthly-maintenance, ATM, late-payment).
- Severity:
lowfor fees < $10,mediumfor fees $10–$50,highfor overdraft fees and late-payment fees regardless of amount. - Always actionable: most fees are negotiable or avoidable.
Workflow
Anomaly Scan Progress:
- [ ] Step 1: Build merchant statistics from transactions_history
- [ ] Step 2: Run Rule 1 (duplicate within 48h)
- [ ] Step 3: Run Rule 2 (statistical anomaly)
- [ ] Step 4: Run Rule 3 (first-merchant high-dollar)
- [ ] Step 5: Run Rule 4 (geography/time)
- [ ] Step 6: Run Rule 5 (fees)
- [ ] Step 7: Deduplicate alerts (one tx may trigger multiple rules)
- [ ] Step 8: Rank by severity then dollar impact
- [ ] Step 9: Attach recommended actions
Deduplication
A single transaction may legitimately trigger multiple rules (e.g., a $5,000 charge at a brand-new merchant in another state — Rules 3 and 4). Combine into a single alert with triggered_rules: [...] and the highest severity.
Recommended actions
Each alert carries one of:
call_bank_fraud_line— forhighseverity charges that the user does not recognize.freeze_card— for confirmed fraud or before calling the bank if multiple charges fired within hours.dispute_charge— for known-merchant overcharges or duplicate post-and-pending issues.negotiate_fee— forfinancial.fees(overdraft, monthly maintenance) that have a known negotiation playbook.monitor— formedium/lowalerts where the user should confirm but no action is required if it's legitimate.
Always include a one-line evidence describing what triggered the rule, with concrete numbers.
Output contract
{
"scanned": {
"transactions_new": 142,
"transactions_history": 1820,
"merchants_with_stats": 218
},
"alerts": [
{
"id": "alert_20260424_001",
"severity": "high",
"triggered_rules": ["firs
Установить anomaly-fraud-scanner в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл anomaly-fraud-scanner?
Scans transactions for fraud and anomaly signals — duplicate charges within 48 hours, transactions more than 3 standard deviations above a merchant's historical average, first-ever transaction with a new merchant above a high-dollar threshold, and unusual geography or time. Produces severity-tagged alerts with the transaction id, evidence, and a recommended action (call bank, freeze card, dispute, monitor). Use for vigilance scans on every drop, after any large unexplained outflow, or when user mentions fraud check, suspicious charge, anomaly detection, or duplicate charge.
Как установить скилл anomaly-fraud-scanner?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл anomaly-fraud-scanner запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub