Duplicate invoice detection
Detects invoice duplicates by identifying payables from the same supplier with identical or very close amounts over a short period.
65/100ยท๐ MonthlyยทIntermediateControllerAP Manager
ReconciliationSuppliersget_payablesget_supplier_by_id
๐ฏ Skill purpose
Detects invoice duplicates by identifying payables from the same supplier with identical or very close amounts over a short period.
๐ What it produces
List of suspect invoice pairs with supplier, amounts, dates, and duplicate confidence level.
โก Benefit
Before
Invoice duplicates are caught late, generating overpayments and costly supplier disputes.
After
Proactive duplicate detection before payment, avoiding overpayments and reimbursement procedures.
# Duplicate invoice detection ## Purpose Identify pairs of invoices that could be duplicates before they get paid twice. Two detection criteria: same exact amount from the same supplier within ยฑ5 days, or same invoice number from the same supplier. **Limitation:** detection is performed by Claude โ there is no native deduplication in the API. The confidence score depends on the data available in get_payables. ## Instructions ### Step 1 โ Retrieve payables for the period ``` Call get_payables for the period to check (e.g. last 3 months). Retrieve for each payable: id, supplierId, amount, currency, invoiceDate, invoiceNumber (if available), status. Exclude payables of type creditNote. ``` ### Step 2 โ Detection by amount + supplier + date ``` Group payables by (supplierId, amount, currency). For each group of 2+ payables: Check whether the invoice dates are within ยฑ 5 days of each other If so โ flag as "potential duplicate โ identical amount" Ignore subscriptions (payableType=subscription) โ normal recurring payments. ``` ### Step 3 โ Detection by invoice number ``` If invoiceNumber is available in the metadata: Group by (supplierId, invoiceNumber) Any group of 2+ = confirmed duplicate (same reference) Flag as "probable duplicate โ same invoice number" ``` ### Step 4 โ Enrichment of detected duplicates ``` For each suspicious pair: Call get_supplier_by_id to get the supplier's name Note: status (toPrepare, toExport, exported, paid) โ pairs already paid take priority ``` ### Step 5 โ Duplicate report ``` Present by risk level: HIGH RISK: same invoice number from the same supplier โ Supplier | Amount | Date 1 | Date 2 | Status 1 | Status 2 MEDIUM RISK: same amount ยฑ 5 days from the same supplier โ Supplier | Amount | Date 1 | Date 2 | Days apart For each pair: recommendation (block, verify, ignore) ``` ## Points to watch - The same amount from the same supplier ยฑ5 days can be legitimate (e.g. weekly partial deliveries) - Recurring subscriptions trigger false positives โ exclude them explicitly - This skill is a decision-support tool, not automatic deletion - Prioritize pairs where at least one invoice is "toPay" or already exported ## Example prompts - "Are there any duplicate invoices over the last 3 months?" - "Check if we have duplicate invoices from Amazon or Salesforce" - "Before paying this batch, identify potential duplicates"
How to install this skill
/
- 1Download the file
s47-duplicate-invoice-detection.mdusing the button above. - 2Place the file in the
.claude/directory of your project (or~/.claude/for a global install).cp s47-duplicate-invoice-detection.md .claude/s47-duplicate-invoice-detection.md - 3Use in Claude Code โ the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
๐ก Make sure the Spendesk MCP is configured in your
.claude/settings.json with the tools get_payables, get_supplier_by_id.Similar skills
โ
Top