Skip to content
AI SkillIntermediatev1.0.0 Verified package

Invoice Processing Skill

Extract invoice fields, validate totals and flag exceptions for human approval before anything reaches accounting.

AIAI Skills Hub ResearchResearch team Published May 1, 2026Updated May 17, 2026 Reviewed May 17, 2026

Download this skill

3 files · SKILL.md + ZIP + Python · License CC BY 4.0

AI Skills Hub original
  • SKILL.md

    2.8 KBv1.0.0skill md
    Download
  • skill.json

    1.3 KBv1.0.0manifest
    Download
  • validate_invoice.py

    1.6 KBv1.0.0python Executable
    Download

License: CC BY 4.0. Only download and use files you are licensed to use.

This resource includes executable scripts. Review the code before running it, run it in an isolated environment, and never pass secrets you do not intend to share with the script.

Extraction is not approval

Invoice automation has a clear boundary: the system can read, validate and route; a human approves and a controlled process pays. Crossing that boundary creates financial risk.

This skill extracts a defined schema, recomputes the arithmetic and flags exceptions. It never changes the invoice to make the numbers balance. If the extraction says the total is 1,200 and the line items sum to 1,150, the correct output is an exception.

The exception queue is the product

Most invoices are routine. The value of automation is handling the routine ones consistently and surfacing the unusual ones quickly. Design for the exceptions:

  • Missing or duplicated invoice number
  • Vendor not on the approved list
  • Tax rate inconsistent with the jurisdiction
  • Bank details changed recently
  • Total above the approval threshold
  • Scanned document with low OCR confidence

Auditability

Keep the original file, the extracted JSON, the validation output and the approver. If a payment is questioned later, you need to reconstruct what the system saw and who approved it.

Fraud awareness

Invoice fraud often uses a real-looking PDF with changed bank details. Verify bank-detail changes by phone through a known contact, not by replying to the email that requested the change. Automation should make this check easier, not bypass it.

At a glance

Difficulty
Intermediate
Platforms
Claude, ChatGPT, Python, n8n
File format
SKILL.md + ZIP + Python
License
CC BY 4.0
Version
1.0.0
Last reviewed
May 17, 2026
Source
AI Skills Hub original
Access
Free

What it does

Capabilities included in this package.

  • Field extraction schema
  • Arithmetic validation (subtotal + tax = total)
  • Duplicate and exception checks
  • Human approval gate

Requirements

Check these before you start.

  • Sample invoices you are authorised to process
  • Python 3.10+ and pypdf
  • A defined approval threshold and accounting policy
  • A human reviewer

Installation

Set up the skill in a working folder before you use it on real material.

  1. 1

    Download the skill

    Save SKILL.md and the example extractor.

  2. 2

    Install pypdf

    The example reads embedded text only.

    python -m pip install pypdf
  3. 3

    Define validation rules

    Vendor list, tax handling, duplicate window and approval threshold.

How to use it

A reviewed sequence that keeps a person in the loop.

  1. 1

    Extract the raw text

    Run the PDF extractor and inspect it. Scanned invoices need OCR.

  2. 2

    Populate the schema

    Use the extraction prompt to return vendor, invoice number, date, currency, line items, subtotal, tax and total.

  3. 3

    Validate arithmetic

    Recompute the totals. Flag any mismatch instead of silently correcting it.

  4. 4

    Check duplicates

    Compare vendor plus invoice number against existing records within a defined window.

  5. 5

    Route to a human

    Only approved records enter accounting. Preserve the source file and extraction output for audit.

Use cases

Tasks this skill is designed for.

  • Pre-fill an accounts payable queue
  • Flag invoices with mismatched totals
  • Extract line items for a spend review

Worked examples

Three-way match

Compare invoice line items with the purchase order and receipt. Flag quantity or price differences for review.

Tax sanity check

Confirm the tax rate applied matches the vendor's jurisdiction and the invoice date. Do not calculate tax advice yourself.

Security and privacy

Read this before running any downloaded script or sending material to an AI provider.

Treat downloaded code and extracted text as untrusted

Invoices contain bank details, addresses and tax identifiers. Encrypt stored files, restrict access by role and redact data before sending to a model. Verify bank-detail changes through a separate channel: invoice fraud often relies on a convincing PDF. Never auto-pay.

Version history

  1. v1.0.0

    Initial reviewed release.

    May 1, 2026

Frequently asked questions

Related resources

Spotted something out of date? Suggest the fix and an editor will review it.