Duplicate invoice detection

Detects invoice duplicates by identifying payables from the same supplier with identical or very close amounts over a short period.

โ†“ Download skill (.md)
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

/
  1. 1
    Download the file s47-duplicate-invoice-detection.md using the button above.
  2. 2
    Place 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
  3. 3
    Use 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
95/100ยท๐Ÿ” Ad hocยทExpert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100ยท๐Ÿ“… WeeklyยทBeginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
90/100ยท๐Ÿ” Ad hocยทIntermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst