agentleFS
BuilderCedBuilderCed/agent-skills/skills/documents/invoice-processing/SKILL.md

invoice-processing

Skill2 starsChanged 7 months agoMITView on GitHub

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

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Does not perform OCR (uses existing OCR output or structured XML)

    line 102
  2. Distinctive:

    Does not approve or pay invoices (validation and extraction only)

    line 103
  3. Distinctive:

    Does not connect to ERP systems (outputs structured data)

    line 104
  4. Very specific:

    Does not handle tax compliance (see fr-comptabilite)

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

{
  "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

RuleCheckSeverity
Required fieldsinvoice_number, date, supplier, totalCritical
Math consistencysum(lines) = subtotal, subtotal + VAT = totalCritical
VAT rate validityRate matches country standard ratesWarning
Duplicate detectionSame number + supplier + amountCritical
Date logicdue_date >= invoice_dateWarning
CurrencyValid ISO 4217 codeWarning

Anomaly Detection

AnomalySignalAction
Duplicate invoiceSame number + supplier + amount +/- 5%Block, flag for review
Round amountTotal is exact round number (1000, 5000)Flag (common in fraud)
Weekend/holiday dateInvoice dated on non-business dayFlag
Unusual amount> 3 standard deviations from vendor averageFlag for review
Missing VATTaxable transaction with 0% VATFlag, 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)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.