- Home
- Skills
- Agents & Orchestration
- InvoSentry OCR: Invoice Extractor & Math Auditor
Works with the AI Agents you already use
InvoSentry OCR: Invoice Extractor & Math Auditor
by RAGU RAM.P
Extract, math-audit, duplicate-check, and export invoices (PDF/PNG/JPG/TIFF) to JSON, CSV, Excel, or SQLite—100% locally with zero API keys.
$5
InvoSentry OCR: Invoice Extractor & Math Auditor
Example session with this skill installed
Extract data from invoices/vendor_acme_01.pdf, run a math audit, and save the results to the local database.
- Read your context and instructions
- Compiled the invosentry ocr
- Generated the data export
I processed invoices/vendor_acme_01.pdf using
InvoSentry OCR (python cli.py extract invoices/vendor_acme_01.pdf --save). Extraction succeeded with
94.3% mean OCR confidence, the deterministic math audit
PASSED (0.00 discrepancy), no duplicate was found, and the record was saved as
Invoice ID 1 in SQLite.
Invoice Summary (INV-2026-001)
| Field | Extracted Value |
|---|---|
| Vendor | Acme Hardware Labs LLC |
| Invoice Number | INV-2026-001 |
| Invoice / Due Date | 2026-10-15 / 2026-11-14 |
| PO Number / Terms | PO-99120 / Net 30 |
| Subtotal / Tax / Shipping | $1,395.00 / $111.60 / $25.00 |
| Total Amount | $1,531.60 USD |
| Validation / Grade | VALIDATED (EXCELLENT) |
| Duplicate Check | false (NONE) |
Structured JSON Output (cli.py)
{
"filename": "vendor_acme_01.pdf",
"invoice_id": 1,
"saved": true,
"ocr": {
"mean_confidence": 94.3,
"word_count": 87,
"page_count": 1
},
"validation": {
"status": "VALIDATED",
"grade": "EXCELLENT",
"math_audit": {
"status": "PASSED",
"is_valid": true,
"calculated_total": 1531.6,
"extracted_total": 1531.6,
"discrepancy": 0.0,
"line_items_sum": 1395.0,
"line_items_match": true
}
},
"duplicate": {
"is_duplicate": false,
"severity": "NONE"
}
}
Next Steps
- Export to Excel or CSV:
python cli.py export --format excel --output out/report.xlsx - Inspect line items & audit trail:
python cli.py get 1
vendor_acme_01.pdf
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual data entry for vendor bills is slow and error-prone. InvoSentry OCR provides a local, production-ready pipeline to extract, audit, and store invoice data from PDFs and images without relying on external API keys or per-call fees.
What it does
- Multi-format OCR: Extracts text from PDF, PNG, JPG, and TIFF files using OpenCV preprocessing and Tesseract OCR.
- Field parsing: Identifies vendor names, invoice numbers, dates, PO numbers, currency, subtotal, tax, and line items via rule-based NLP.
- Deterministic math auditing: Validates
qty × unit_price, line-item sums, subtotals, tax, and grand totals to catch discrepancies. - Duplicate detection: Checks new extractions against existing SQLite records and within batches to prevent double-entry.
- Structured persistence: Saves validated invoices, line items, and audit trails to a local SQLite ledger.
- Accounting exports: Generates ready-to-use JSON, summary CSV, line-item CSV, and Excel (
.xlsx) reports.
How it works
- Run
diagnostics --strictto verify Tesseract OCR availability and local environment configuration. - Execute
extracton a single file orbatchon a directory to parse invoice fields and line items. - Pass
--saveto persist results to SQLite and trigger duplicate detection. - Inspect the
validationobject in the JSON output to confirm math integrity (PASSED) and OCR confidence. - Run
exportto generate JSON, CSV, or Excel reports for downstream accounting.
Frameworks & tools
Built with Python 3.10+, Tesseract OCR, OpenCV, pdfplumber/pypdf, Pydantic, openpyxl, and SQLite for local persistence.
Why this beats prompting it yourself
Generic LLM prompts often hallucinate invoice totals or misread multi-column tables. InvoSentry OCR enforces deterministic math audits, OpenCV preprocessing, and a persistent SQLite ledger that raw prompts lack.
Use cases
- Automating accounts payable workflows by batch-processing vendor bill folders.
- Auditing financial records for math errors or duplicate invoice submissions.
- Building a local searchable archive of structured invoice data for small-business accounting.
- Exporting line-item data from scanned receipts into Excel (
.xlsx) or CSV for tax preparation.
Requirements & limitations
Requires Python 3.10+ (pip install -r requirements.txt) and the Tesseract OCR binary installed on the host machine (PATH or TESSERACT_CMD). Extraction accuracy depends on scan resolution and standard invoice layouts.
Requires local Tesseract OCR installation. Performance depends on image legibility. Processing is optimized for standard invoice structures.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
python 3.10 +Tesseract OCR
Run pip install -r requirements.txt and ensure Tesseract OCR is installed on PATH (or set TESSERACT_CMD). Verify setup anytime with: python cli.py diagnostics --strict
Permissions
File Scopes
Terminal/Shell runs python cli.py locally; Read Files reads input invoice PDFs and images; Write Files persists the local SQLite ledger and exports JSON, CSV, or Excel files. No network access or external services are used.
What's inside
Creator
RAGU RAM.P
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.