# Invoice Processing

> Extract, validate, and classify invoices from PDF, Factur-X, and UBL formats. Multi-country support with field mapping and anomaly detection.

- **Type:** Skill
- **Install:** `agentstack add skill-builderced-agent-skills-invoice-processing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [BuilderCed](https://agentstack.voostack.com/s/builderced)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [BuilderCed](https://github.com/BuilderCed)
- **Source:** https://github.com/BuilderCed/agent-skills/tree/main/skills/documents/invoice-processing
- **Website:** https://skills.sh/BuilderCed/agent-skills

## Install

```sh
agentstack add skill-builderced-agent-skills-invoice-processing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Invoice Processing

## When to Use

- Extracting data from PDF invoices
- Validating Factur-X or UBL structured invoices
- Classifying invoices by type, vendor, or account
- Detecting anomalies (duplicates, unusual amounts, missing fields)
- Mapping invoice fields to accounting entries

## Extraction Pipeline

```
1. INPUT: PDF / Factur-X / UBL / image
2. DETECT FORMAT: structured XML embedded? → parse directly
   No XML? → OCR + field extraction
3. EXTRACT FIELDS: map to canonical schema
4. VALIDATE: required fields, amounts, VAT consistency
5. CLASSIFY: expense category, accounting account, vendor
6. OUTPUT: structured JSON + confidence scores
```

## Canonical Invoice Schema

```json
{
  "invoice_number": "FA-2026-042",
  "invoice_date": "2026-04-15",
  "due_date": "2026-05-15",
  "supplier": {
    "name": "Fournisseur SAS",
    "tax_id": "FR12345678901",
    "address": "12 rue Example, 75001 Paris"
  },
  "buyer": {
    "name": "Client SARL",
    "tax_id": "FR98765432109"
  },
  "lines": [
    {
      "description": "Prestation conseil",
      "quantity": 5,
      "unit_price": 200.00,
      "vat_rate": 20.0,
      "line_total": 1000.00
    }
  ],
  "subtotal": 1000.00,
  "vat_amount": 200.00,
  "total": 1200.00,
  "currency": "EUR",
  "payment_terms": "30 jours net"
}
```

## Validation Rules

| Rule | Check | Severity |
|------|-------|----------|
| Required fields | invoice_number, date, supplier, total | Critical |
| Math consistency | sum(lines) = subtotal, subtotal + VAT = total | Critical |
| VAT rate validity | Rate matches country standard rates | Warning |
| Duplicate detection | Same number + supplier + amount | Critical |
| Date logic | due_date >= invoice_date | Warning |
| Currency | Valid ISO 4217 code | Warning |

## Anomaly Detection

| Anomaly | Signal | Action |
|---------|--------|--------|
| Duplicate invoice | Same number + supplier + amount +/- 5% | Block, flag for review |
| Round amount | Total is exact round number (1000, 5000) | Flag (common in fraud) |
| Weekend/holiday date | Invoice dated on non-business day | Flag |
| Unusual amount | > 3 standard deviations from vendor average | Flag for review |
| Missing VAT | Taxable transaction with 0% VAT | Flag, check exemption |

## What This Skill Does NOT Do

- Does not perform OCR (uses existing OCR output or structured XML)
- Does not approve or pay invoices (validation and extraction only)
- Does not connect to ERP systems (outputs structured data)
- Does not handle tax compliance (see `fr-comptabilite`)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [BuilderCed](https://github.com/BuilderCed)
- **Source:** [BuilderCed/agent-skills](https://github.com/BuilderCed/agent-skills)
- **License:** MIT
- **Homepage:** https://skills.sh/BuilderCed/agent-skills

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-builderced-agent-skills-invoice-processing
- Seller: https://agentstack.voostack.com/s/builderced
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
