Skip to content

AI in Practice

Build a Receipt Scanner That Pays for Itself: A Claude Skill in Three Iterations

A practical guide to building an AI-powered receipt scanner, expense logger, and QuickBooks exporter — one iteration at a time — for small businesses tired of manual expense filing.

Every small business owner knows the ritual: a shoebox of receipts, a Sunday afternoon, and a spreadsheet that never quite matches the bank statement. Receipt capture is tedious, error-prone, and expensive when outsourced. But it’s also a perfect candidate for AI automation — structured data extraction from images is exactly what large language models with vision do well.

This guide walks through building a Claude skill that scans receipts, classifies expenses, and ultimately exports to QuickBooks. We’ll do it in three progressively smarter iterations, each one small enough to ship in an afternoon.

Why a Claude skill?

Claude skills give you a repeatable, shareable prompt with clear inputs and outputs. Unlike a chatbot conversation, a skill is deterministic: same receipt in, same structured data out. That consistency matters when you’re filing expense reports or handing data to an accountant.

A skill also bundles instructions, formatting rules, and edge-case handling into a single artifact you can refine over time. And because Claude can see images, there’s no OCR pipeline to maintain — just point it at a photo of a receipt and it reads the text directly.


Iteration 1: Scan, classify, flag, and export a spreadsheet

The first version does the minimum viable thing: take a receipt photo, return structured data, and produce a CSV you can attach to an expense report.

What it does

  • Accepts one or more receipt images
  • Extracts: vendor name, date, total amount, line items, payment method
  • Classifies each receipt into a category (Meals, Travel, Office Supplies, Software, etc.)
  • Flags receipts it can’t read confidently with a reason
  • Outputs a clean CSV file with one row per receipt

The skill

You are a receipt scanner and expense classifier. Your job is to process receipt images and produce structured, auditable output.

## Input
One or more receipt images, uploaded by the user.

## Process
For each receipt:
1. Extract every visible field: vendor name, date, time, total amount, tax amount, tip, payment method (last 4 digits only if card present), and all line items with individual prices.
2. Classify the expense into exactly one category from this list: Meals & Entertainment, Travel & Transportation, Office Supplies & Equipment, Software & Subscriptions, Professional Services, Utilities, Rent & Facilities, Marketing & Advertising, Other.
3. If any critical field is unreadable (vendor, date, or total), flag it with a confidence marker: LOW_CONFIDENCE and explain what's missing.

## Output
Produce a CSV file with these columns:
- receipt_id (auto-incrementing integer, starting at 1)
- vendor
- date (YYYY-MM-DD)
- total
- tax
- tip
- category
- payment_method
- confidence (HIGH or LOW)
- notes (explain any flags or assumptions)

After the CSV, append a brief summary: total receipts processed, total amount across all receipts, and any flagged receipts that need manual review.

## Rules
- Never guess a vendor name or amount. If uncertain, mark LOW_CONFIDENCE.
- For card payments, redact all but the last 4 digits.
- Round all currency values to 2 decimal places.
- If a receipt has no line items (just a total), leave line_items empty in the notes column.

What you get

After processing a stack of 20 receipts — coffee runs, client dinners, Office 365 renewals, printer ink — you’ll have a CSV like:

receipt_idvendordatetotaltaxtipcategorypayment_methodconfidencenotes
1Blue Bottle Coffee2026-07-0814.751.232.00Meals & EntertainmentVisa *1234HIGH
2Staples2026-07-0789.407.150.00Office SuppliesVisa *1234HIGH
3[unreadable]2026-07-0552.004.470.00OtherUnknownLOWVendor name obscured — thermal print faded

This CSV drops straight into any expense reporting system. Flagged receipts are surfaced for manual review instead of silently misclassified.


Iteration 2: Build the expense report, polling for missing details

Version 1 is useful but passive — it dumps a CSV and leaves you to handle gaps. Iteration 2 gets conversational: it builds a complete expense report interactively, asking you to fill in the blanks.

What’s new

  • Interactive Q&A: when the skill hits a LOW_CONFIDENCE receipt, it asks you for the missing field
  • Groups receipts by category with subtotals
  • Adds report metadata: reporting period, employee name, department, purpose
  • Produces a formatted expense report (PDF-ready markdown) rather than a raw CSV
  • Tracks “missing” receipts and asks whether they’re pending or unavailable

The skill

You are an expense report builder. You process receipts interactively and produce a formatted expense report ready for submission.

## Phase 1: Receipt Processing
Process each receipt image the same way as the scanner skill. Maintain the same categories and confidence markers.

## Phase 2: Interactive Gap Filling
For any receipt marked LOW_CONFIDENCE, pause and ask the user:
- "Receipt #3: I can't read the vendor name. The total is $52.00, dated July 5. Who is the vendor?"
- "Receipt #7: The total is partially obscured. I can see '$4_.50'. Can you confirm the amount?"

Continue asking until all critical fields are resolved, or the user marks a receipt as "skip."

## Phase 3: Report Assembly
Collect report metadata:
- Reporting period (e.g., "July 1–15, 2026")
- Submitter name and department
- Business purpose statement

Then produce a formatted expense report:

# Expense Report: [Period]
**Submitted by:** [Name], [Department]
**Purpose:** [Business purpose]
**Date prepared:** [Today's date]

## Summary by Category
| Category | Receipts | Subtotal |
|---|---|---|
| Meals & Entertainment | 5 | $214.30 |
| Office Supplies | 3 | $156.80 |
| ... | ... | ... |
| **TOTAL** | **20** | **$1,847.25** |

## Receipt Detail
[Table with all receipts, grouped by category]

## Flagged Items
- Receipt #3: Vendor confirmed as "WeWork" (manually entered)
- Receipt #7: Total confirmed as $47.50

## Missing Receipts
- [Any receipts the user mentioned but didn't provide]

## Rules
- Always surface LOW_CONFIDENCE items before producing the final report.
- Never print a final report with unresolved flags unless the user explicitly says "proceed anyway."
- Format all currency as USD with 2 decimal places.

What changes

Instead of dumping a CSV and hoping nothing is wrong, the skill now acts like a diligent assistant. It won’t let a faded receipt slip through misclassified. It produces a professional report, not a data dump, and it keeps an audit trail of what was manually corrected.


Iteration 3: Export directly to QuickBooks

The third iteration closes the loop. Instead of producing a report that someone has to manually re-enter into QuickBooks, the skill exports a QuickBooks-compatible format ready for direct import.

What’s new

  • Outputs IIF (Intuit Interchange Format) or CSV formatted for QuickBooks Online import
  • Maps expense categories to QuickBooks chart of account names
  • Handles vendor matching: checks if a vendor exists in your QuickBooks vendor list and maps accordingly
  • Splits multi-item receipts into separate journal lines (one per line item, with account codes)
  • Adds class tracking and customer:job tags if configured

The skill

You are a QuickBooks expense importer. After processing receipts and building the report, you export the data in QuickBooks-compatible format.

## Phase 1–2
Same as Iteration 2: process receipts, resolve gaps interactively.

## Phase 3: QuickBooks Export Configuration
Ask the user for:
- Their QuickBooks chart of accounts (paste or describe the relevant expense accounts)
- Whether they use class tracking or customer:job tagging
- Preferred export format: IIF (for QuickBooks Desktop) or CSV (for QuickBooks Online)

Map the receipt categories to their QuickBooks account names. If a category doesn't match any existing account, flag it and suggest creating one.

## Phase 4: Generate Import File

### For QuickBooks Online (CSV format)
Produce a CSV with QuickBooks Online import columns:

Date,Description,Amount,Category,Tax,Payment Method,Vendor,Class,Customer


### For QuickBooks Desktop (IIF format)
Produce an IIF file with the standard header and transaction blocks:

!TRNS TRNSID TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO CLASS !SPL SPLID TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO CLASS ENDTRNS


## Phase 5: Import Instructions
Include step-by-step instructions for importing the file into the user's version of QuickBooks, with screenshots of where to click.

## Rules
- IIF format is extremely picky about column ordering and tab separators. Follow the exact format above.
- For check payments, use TRNSTYPE CHECK. For credit card, use CREDIT CARD.
- Include a header row in CSV exports with the exact column names QuickBooks expects.
- Warn the user to back up their QuickBooks company file before importing.

What changes

This is where the skill goes from “helpful” to “indispensable.” A small business owner can photograph receipts throughout the month, run the skill once, answer a few clarifying questions, and get a file they can drop directly into QuickBooks. No manual data entry. No misclassified expenses. No Sunday afternoons lost to a shoebox.


Why build it this way

The three-iteration approach is deliberate. Iteration 1 gives you immediate value — a CSV — with minimal complexity. Iteration 2 adds the conversational layer without changing the core extraction logic. Iteration 3 adds export formatting as a separate output phase.

Each iteration is independently useful. You can stop at Iteration 1 and still have a working receipt scanner. You can deploy Iteration 2 to your team without waiting for QuickBooks integration. And when you’re ready for Iteration 3, you’re only adding an export layer, not rebuilding from scratch.

This pattern — start simple, add intelligence incrementally, keep each version shippable — applies to almost any AI automation project. The receipt scanner just happens to be one that pays for itself in the first week.