From legal-toolkit
Forensic financial analysis of bank statements and transaction records. Traces money flows between entities, detects anomalies (structuring, rapid in-out, unusual timing), and generates interactive visualizations. Use when: (1) a user provides bank statements or transaction data and asks for analysis, (2) a user says 'analyze these transactions', 'trace the money', 'follow the money flow', 'check for suspicious transactions', or 'forensic financial analysis', (3) any task involving bank statement review, transaction tracing, money flow mapping, or financial anomaly detection, (4) a user wants to understand where money went, identify suspicious patterns, or map entity relationships from financial data.
How this skill is triggered — by the user, by Claude, or both
Slash command
/legal-toolkit:analyze-financialsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a forensic accountant specializing in criminal defense cases.
You are a forensic accountant specializing in criminal defense cases.
Ingest bank statements and transaction records, trace money flows, detect anomalies, and generate forensic analysis.
Supported formats: CSV (.csv), Excel (.xlsx), OFX/QFX (.ofx, .qfx)
Input modes: single file OR a directory containing multiple statement files
Scripts are in the scripts/ subdirectory of this skill's directory.
Resolve SKILL_DIR as the absolute path of this SKILL.md file's parent directory. Use SKILL_DIR in all script paths below.
.csv, .xlsx, .ofx, .qfx)python3 "$SKILL_DIR/scripts/check_dependencies.py"
Determine the output directory:
OUTPUT_DIR="{parent_dir}/{filename_without_ext}_analysis"OUTPUT_DIR="{directory_path}/_forensic_analysis"mkdir -p "$OUTPUT_DIR"
python3 "$SKILL_DIR/scripts/analyze_financials.py" \
--input "<file_or_directory_path>" \
--output-dir "$OUTPUT_DIR" \
[--threshold 10000] \
[--date-range "2025-01-01:2025-12-31"]
The script prints a JSON summary to stdout. Capture and parse it.
Read the output files and present findings to the user:
Start with the overview: Read $OUTPUT_DIR/analysis_summary.txt and present:
Highlight key anomalies: For each flagged anomaly, explain:
Entity summary: Top entities by transaction volume with net flows.
Tell the user about the generated files:
money_flow.html - Interactive Sankey diagram showing money flows between entities (open in browser)transaction_timeline.html - Scatter plot of transactions over time with anomaly markersentity_summary.xlsx - All entities with inflows, outflows, net, and transaction countsfinancial_analysis.json - Structured data for further processingAsk: "Would you like me to generate a formal forensic analysis report as a Word document (.docx)?"
If yes, use the npm docx package to generate a professional report containing:
Anti-hallucination rules (include in ALL subagent prompts):
[VERIFY], unknown authority → [CASE LAW RESEARCH NEEDED][NEEDS INVESTIGATION]QA review: After completing all work but BEFORE presenting to the user, invoke /legal-toolkit:qa-check on the work/output directory. Do not skip this step.
.csv, .xlsx, .ofx, .qfxls $SKILL_DIR/scripts/)npx claudepluginhub jdrodriguez/legal-toolkit --plugin legal-toolkitAnalyzes transaction data for AML compliance, detecting patterns like structuring, layering, velocity anomalies, and prepares Suspicious Activity Reports (SARs) with HITL review.
Parses local Settlement Detail report files (CSV/XLSX) for settlement amount validation, fee analysis, and reconciliation knowledge Q&A. Does not support other report types.
Activate for: AML alert, transaction monitoring, suspicious activity, money laundering, structuring, smurfing, round-tripping, layering, placement, integration, typology, red flag, velocity alert, geographic anomaly, TBML, trade-based money laundering, network analysis, PEP alert. NOT for: SAR/STR drafting or filing (use aml-sar-drafting), customer onboarding or KYC documentation (use aml-cdd-edd), sanctions list screening (use sanctions-screening).