reconciliation
bởi google-gemini
Đối chiếu các khoản chi phí đã tải với cơ sở dữ liệu hóa đơn đã phân tích trước, đánh dấu các điểm bất thường như sai lệch số tiền, thiếu hóa đơn, và không khớp người bán…
npx skills add https://github.com/google-gemini/gemini-managed-agents-templates --skill reconciliationReconciliation
Reconcile expenses from expenses.csv against the pre-parsed invoice database (parsed_invoices.json) completely locally (offline). It compares records, performs fuzzy merchant matching, and generates a detailed discrepancies report.
Embedded Script
python3 skills/reconciliation/scripts/reconcile.py --workspace .agents/workspace
Arguments
| Argument | Default | Description |
|---|---|---|
--workspace | .agents/workspace | Workspace directory containing expenses.csv and parsed_invoices.json |
--tolerance | 0.01 | Amount match tolerance in dollars |
What it does
- Loads
expenses.csvfrom.agents/workspace/(columns: date, employee, merchant, category, amount, memo). - Loads
parsed_invoices.jsonfrom.agents/workspace/(generated by thepdf-parsingskill). - Performs local fuzzy matching between expenses and invoice records (normalized merchant names, amount tolerance).
- Flags discrepancies: Amount Mismatch, Missing Invoice, Unmatched Invoice, Merchant Mismatch.
- Generates
.agents/workspace/reconciliation_report.mdwith summary stats and discrepancy tables. - Generates
.agents/workspace/reconciliation_data.jsonwith machine-readable matched results.
Dependencies
None! This script runs 100% locally with zero external API calls.
Discrepancy Types
| Type | Description |
|---|---|
| Amount Mismatch | Expense and invoice matched by merchant but amounts differ beyond tolerance |
| Missing Invoice | Expense record exists with no matching invoice document |
| Unmatched Invoice | Invoice document exists with no matching expense record |
| Merchant Mismatch | Expense and invoice matched by amount but merchant names differ significantly |
Output
| File | Path | Description |
|---|---|---|
| Reconciliation Report | .agents/workspace/reconciliation_report.md | Human-readable markdown report with summary stats, discrepancy table, and matched items |
| Reconciliation Data | .agents/workspace/reconciliation_data.json | Structured JSON with expenses, invoices, matches, and discrepancies |