Extracts structured data from invoice files in PDF, JPG, PNG, and TIFF formats. Activates when the user has an invoice to process, wants to read an invoice PDF, parse billing documents, or asks 'what does this invoice say?' Handles OCR processing, field extraction, confidence scoring, and multi-format detection.
From founder-osnpx claudepluginhub thecloudtips/founder-os --plugin founder-osThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Extract structured data from invoice files (PDF, JPG, JPEG, PNG, TIFF). Used by the extraction-agent as step 1 of the 5-agent pipeline.
Extracted data is ultimately recorded in the consolidated Finance database with Type = "Invoice". DB discovery order: "[FOS] Finance" first, then "Founder OS HQ - Finance", then "Invoice Processor - Invoices" as legacy fallback. The vendor name is matched against the Companies database to populate a Company relation.
| Format | Notes |
|---|---|
| PDF (native) | Text layer available — high confidence |
| PDF (scanned) | Requires OCR — moderate confidence |
| JPG / JPEG | Photograph of invoice — apply OCR |
| PNG | Screenshot or scan — apply OCR |
| TIFF | High-resolution scan — apply OCR |
Reject unsupported formats with error: "unsupported_format". Never attempt to process ZIP, DOCX, or spreadsheet files.
All extracted data must conform to this structure:
{
"vendor": {
"name": "string (required)",
"address": "string or null",
"tax_id": "string or null"
},
"invoice_number": "string or null",
"invoice_date": "ISO 8601 date (required)",
"due_date": "ISO 8601 date or null",
"currency": "ISO 4217 code (default: USD)",
"line_items": [
{
"description": "string",
"quantity": "number",
"unit_price": "number",
"total": "number"
}
],
"subtotal": "number",
"tax": "number",
"total": "number (required)",
"payment_terms": "string or null",
"extraction_confidence": "number 0.0–1.0",
"source_file": "string (original file path)"
}
Assign extraction_confidence on a 0.0–1.0 scale:
| Score | Meaning |
|---|---|
| 0.9–1.0 | Native PDF with clear text; all required fields found |
| 0.7–0.89 | Good OCR result; minor fields missing (address, tax ID) |
| 0.5–0.69 | Moderate confidence; some amounts or dates uncertain |
| 0.3–0.49 | Low confidence; scanned image with poor quality |
| < 0.3 | Very low; partial extraction only |
Do not inflate confidence. A score of 0.92 should mean the data is almost certainly correct, not merely plausible.
For scanned PDFs and image files:
0 vs O, 1 vs l, , vs . in numbersReturn status: "success" with the partial data and the low confidence score. Do NOT return status: "error" — let downstream agents (validation) decide what to do. Flag which fields are uncertain.
If vendor name and total are found but line items cannot be parsed:
line_items: [] (empty array, not null)Sum all tax amounts into a single tax field. Example: "State Tax $10 + Federal Tax $5" → "tax": 15.
Line items may span multiple pages. Ensure all pages are processed before compiling the line items array.
Native PDFs have a text layer — prefer extracting text directly. Scanned PDFs appear as images embedded in a PDF container — apply OCR to the image content.
Return immediately:
{
"status": "error",
"error": "unsupported_format",
"message": "File type not supported. Supported: PDF, JPG, JPEG, PNG, TIFF."
}
quantity × unit_price = total (within rounding)extraction_confidence must honestly reflect the actual quality of extractionsource_file must always be populated with the original file pathline_items array is valid (e.g., single-total invoices) — never return null for line_items