Invoice Data Extractor
A Claude Skill that teaches Claude a consistent procedure for pulling vendor, date, line items, tax, and totals out of any invoice format and returning clean JSON — useful for bookkeeping, expense tracking, and GST reconciliation.
Who it's for
Freelancers, small business owners, and bookkeepers who manually re-type invoice data into spreadsheets or accounting software.
Problem it solves
Invoices arrive in every possible layout — PDF, scanned photo, forwarded email. Manually re-typing vendor name, GSTIN, line items, and totals into a ledger is slow and error-prone. This Skill gives Claude a fixed extraction procedure so output is consistent invoice after invoice.
Copy the Claude Skill
---
name: invoice-data-extractor
description: Extracts structured data (vendor, date, line items, tax, totals) from an invoice PDF or image. Use when the user uploads an invoice, bill, or receipt and wants clean structured data out of it — for bookkeeping, expense tracking, or GST reconciliation.
---
# Invoice Data Extractor
## When to use this skill
Trigger whenever the user shares an invoice, bill, or receipt (PDF, image, or pasted text) and wants the data extracted rather than just summarized.
## Procedure
1. Read the full document before extracting anything — invoices vary wildly in layout, and totals/tax lines are often near the bottom while the vendor GSTIN/PAN is near the top.
2. Extract these fields. If a field is genuinely absent, use `null` — never guess or fabricate a value.
```json
{
"vendor_name": "",
"vendor_gstin": null,
"invoice_number": "",
"invoice_date": "YYYY-MM-DD",
"due_date": null,
"line_items": [
{ "description": "", "quantity": 0, "unit_price": 0, "amount": 0 }
],
"subtotal": 0,
"tax_breakdown": [
{ "type": "CGST", "rate_percent": 0, "amount": 0 }
],
"total_amount": 0,
"currency": "INR",
"payment_terms": null
}
```
3. Sanity-check before returning: `sum(line_items.amount) ≈ subtotal`, and `subtotal + sum(tax_breakdown.amount) ≈ total_amount`. If the numbers don't reconcile within a rupee (rounding), flag the discrepancy in a note rather than silently returning inconsistent totals.
4. If the invoice is a scanned image with unclear text, say explicitly which fields you're less confident about instead of presenting every value with equal certainty.
5. Return the JSON block first, then — only if asked — a one-line plain-English summary.
## Output rules
- Always return valid JSON matching the schema above, even if some fields are null.
- Never invent a GSTIN, PAN, or invoice number that isn't visible in the source document.
- Dates always in ISO format (YYYY-MM-DD), regardless of the source format (DD/MM/YYYY, MM-DD-YY, etc.).Setup Instructions
- 1Download the SKILL.md file below.
- 2In Claude, go to Settings → Capabilities → Skills → Upload skill (or place the file in your project's .claude/skills/ folder if using Claude Code).
- 3Name the folder invoice-data-extractor to match the frontmatter.
- 4Upload or paste an invoice into a new Claude chat — the skill activates automatically because the description matches your request.
- 5Verify the reconciliation check (subtotal + tax = total) on your first few invoices before trusting it on volume.
Frequently Asked Questions
Does this work on scanned/photographed invoices, not just PDFs?
Yes, Claude's vision handles both — but extraction accuracy depends on image clarity. Blurry photos will surface as low-confidence fields per the skill's rules.
Can it handle non-Indian invoice formats?
Yes, the schema is generic (vendor, line items, tax, total). The GSTIN field will simply stay null for a non-Indian invoice.
How is this different from just asking Claude to read an invoice?
Without the skill, output format varies chat to chat. The skill locks in one consistent JSON schema and forces a reconciliation sanity-check every time, which matters if you're piping output into a spreadsheet or accounting tool.
Can I extend the schema with custom fields?
Yes — edit the JSON schema block in the skill file to add fields like cost_center or project_code, and the extraction procedure will follow the new schema.