Sort a year of receipts and invoices for tax time

Point Claude Code at a copy of your receipts folder. It plans first, then renames every file to date_vendor_amount, files them by category and builds a summary spreadsheet with real formulas. Anything it can't read gets flagged.

  • Level Beginner
  • Time About 1 hour
  • Works with
    • Claude Code
    • Claude Desktop
    • Claude.ai
On this page13 sections

By the end of this guide, a messy folder of receipts called things like scan0042.pdf and Document(1).pdf will look like this:

sorted/
  Software/2025-03-03_notion-labs-inc_12.00.pdf
  Office and printing/2025-06-14_brightline-print-shop_96.00.pdf
  Travel/2025-09-22_coastal-rail_64.50.pdf
  Needs review/IMG_7781.pdf
summary.xlsx

summary.xlsx has one row per receipt and a totals sheet that uses real formulas. You also get a list of everything Claude wasn’t sure about.

This isn’t tax advice. Claude sorts and summarizes files. It doesn’t know your tax rules, and it can misread a date or an amount. Keep every original receipt exactly as it is, check the totals yourself, and ask your accountant what counts as deductible and which records you have to keep.

What you’ll have at the end

  • A work folder with every receipt renamed to YYYY-MM-DD_vendor_amount and filed by category.
  • plan.csv, the plan you approved before anything changed.
  • summary.xlsx, with a Receipts sheet and a By category sheet that adds up each category and currency with formulas.
  • A short list of files to check by hand: unreadable scans, dates that could mean two things, and likely duplicates.

What you need

You needDetails
Claude CodeNeeds a Pro, Max, Team, Enterprise or Console account. The free claude.ai plan doesn’t include it. Use it in a terminal or in the Code tab of the Claude Desktop app.
Or CoworkPaid plans only. Better for small batches (see “Other ways to run it” below).
Your receiptsPDFs, photos or saved emails, all copied into one folder.
PythonClaude uses Python to build the spreadsheet. If a library is missing, it will ask to install it.

Each step uses part of your plan’s usage, and a big folder uses more. Start with a test batch of about 20 files.

Step 1: Make a safe copy to work on

Never point Claude at your only copy.

  1. Make a new folder, for example tax-2025-work in your Documents folder.
  2. Inside it, make a folder called inbox.
  3. Copy (don’t move) your receipts into inbox. Keep the originals where they were, and keep a backup too.

Claude will only copy files out of inbox. It never moves or deletes anything there, so if something goes wrong, you delete sorted/ and start again.

Step 2: Open Claude in that folder

Terminal (Claude Code CLI). Install it first if you need to. On macOS or Linux, run this command (on Windows, the setup page has the PowerShell command):

curl -fsSL https://claude.ai/install.sh | bash

Then open the folder and start Claude:

cd ~/Documents/tax-2025-work
claude

The first time you start it, sign in through your browser.

Claude Desktop.

  1. Click the Code tab.
  2. Under Environment, choose Local.
  3. Under Project folder, select tax-2025-work.
  4. In the mode selector next to the send button, choose Manual. Claude then asks before it edits files or runs commands.

Step 3: Ask for a dry run first

A dry run means Claude reads everything and writes a plan, but changes nothing. Paste this prompt and change the categories to match your business:

You're helping me sort my 2025 receipts and invoices. Work only inside this folder.

Rules:
- This is a dry run. Don't rename, move, copy or delete any file yet.
- Never change what's inside a file.

Read every file in inbox/ (PDFs, images and text files). For each one, find the date, the vendor, the total amount and currency, and what it was for.

Pick one category per file from this list: Software, Equipment, Travel, Meals, Office and printing, Professional fees, Other. Use "Needs review" if you can't read the file or aren't sure.

Write plan.csv with these columns:
current_file, date, vendor, amount, currency, category, new_name, confidence, note

- date: YYYY-MM-DD
- new_name: YYYY-MM-DD_vendor_amount.ext (vendor in lowercase with hyphens, amount like 96.00, keep the original file extension)
- confidence: high, medium or low
- note: say why if confidence isn't high. If a date could be read two ways (like 12/08/2025), say so. Flag likely duplicates (same vendor, date and amount).

Then give me a short summary: how many files, how many need review, possible duplicates, and the total per category and currency. Don't convert currencies.

Claude asks for permission before it writes plan.csv. Approve it.

Step 4: Check and edit the plan

Open plan.csv in Excel, Numbers or Google Sheets. Sort by the confidence column and look at every row that isn’t high. Fix what’s wrong:

  • Wrong date or amount: type the right value, and fix new_name to match.
  • Duplicate: set the extra copy’s category to Skip.
  • Wrong category: change it.

Save it as CSV again, keeping the same name.

Step 5: Apply the plan and build the spreadsheet

I've checked plan.csv and edited some rows. Use it exactly as it is now.

1. For each row, copy the file from inbox/ to sorted/<category>/<new_name>. Copy, don't move: leave inbox/ untouched.
   - Skip rows where category is "Skip".
   - Rows marked "Needs review" go to sorted/Needs review/ with their original name.
   - If two files would get the same name, add _2, _3 before the extension.
2. Build summary.xlsx with two sheets:
   - "Receipts": one row per copied file with date, vendor, category, amount, currency, file path and note. Store dates as real dates and amounts as numbers, not text. Freeze the header row.
   - "By category": one row per category and currency, with a SUMIFS formula that adds up the Receipts sheet. Use formulas, not typed-in totals. Don't convert currencies.
3. Check your work: count the files in sorted/ and the rows in the Receipts sheet, and tell me if they don't match the rows in plan.csv (minus skipped rows).
4. Finish with a list of everything I still need to look at myself.

SUMIFS is a spreadsheet formula that adds up the amounts matching a category and a currency. If you fix an amount on the Receipts sheet later, the totals update on their own.

Step 6: Spot-check 10 files

Before you send anything to your accountant, open 10 files at random from sorted/ and compare each with its row in summary.xlsx. Check the date, the vendor and the total. Then open everything in Needs review and add those by hand.

What we saw when we tested it

We ran both prompts in Claude Code on seven made-up receipts: four PDFs with text, one PDF that held only a black box, a café receipt and an order email. Claude:

  • Marked the blank PDF “Needs review” instead of guessing.
  • Flagged 12/08/2025 as either 8 December or 12 August and asked us to confirm.
  • Spotted two identical train tickets as likely duplicates.
  • Said that a ”$” with no currency code was an assumption.
  • Pointed out that a shipping email isn’t proof of payment.

After we marked one ticket Skip, it copied six files, left inbox/ untouched and built both sheets with SUMIFS formulas. Your results will vary with your files, so do Step 6 anyway.

What can go wrong

  • It reads a number wrong. Faded thermal receipts, handwriting and photos at an angle cause most errors. That’s why the dry run and the spot-check exist.
  • Dates flip. 03/04/2025 means different days in different countries. Tell Claude your format up front, for example “dates are day/month/year”.
  • Scans with no text. Some scanned PDFs are just pictures. Claude may still read them as images, but blurry ones end up in Needs review. Re-scan those, or type them in yourself.
  • Huge folders. Hundreds of files in one go can run long and use a lot of your plan. Work in batches by month or by quarter: put one batch in inbox, run both prompts, then move on to the next.
  • Private data. Receipts can show card digits, addresses and client names. The files Claude reads are sent to Anthropic to be processed. Read Claude Code’s data usage page and check your training-data setting before you start.
  • Totals in the chat aren’t checked. Trust the spreadsheet formulas over any number Claude types in its reply, and check those formulas too.

Other ways to run it

  • Cowork (Claude Desktop, paid plans). Anthropic’s own list of Cowork examples includes “Drop receipts in a folder and ask Claude to create a formatted expense report.” In the Desktop app, select Cowork in the message box, connect your tax-2025-work folder when it asks, and paste the same two prompts. Cowork can only read and write in folders you’ve connected, and it asks before it permanently deletes any file. For big batches, Claude Code in a terminal is usually the better fit.
  • claude.ai, for a handful of files. Upload a few receipts (each file can be up to 30 MB) with Code execution and file creation turned on under Settings > Capabilities. Then ask for the summary spreadsheet. Claude can’t rename the files on your computer from here, but you still get the .xlsx.
  • A ready-made skill. The community Invoice Organizer skill packs a similar workflow into Claude Code. Read its SKILL.md before you install it, and still work on copies.

Make it yours

  • Your accountant’s categories. Ask your accountant for their category list, or last year’s, and paste it into Step 3.
  • One folder per month. Change the path in Step 5 to sorted/<YYYY-MM>/<category>/.
  • Mileage and cash. Add a manual.csv with your own rows and tell Claude to add them to the Receipts sheet.
  • Make it a skill. Once the prompts work for you, turn them into a one-word command. See Turn the prompt you keep retyping into a one-click skill.
  • Monthly habit. Run it on the first of each month, so tax time is just a final check.

Next steps

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. code.claude.com/docs/en/setup (opens in a new tab)
  2. code.claude.com/docs/en/desktop (opens in a new tab)
  3. code.claude.com/docs/en/skills (opens in a new tab)
  4. code.claude.com/docs/en/data-usage (opens in a new tab)
  5. support.claude.com/en/articles/13345190 (opens in a new tab)
  6. support.claude.com/en/articles/12111783-create-and-edit-files-with-claude (opens in a new tab)
  7. raw.githubusercontent.com/ComposioHQ/awesome-claude-skills/master/invoice-organizer/SKILL.md (opens in a new tab)

Related guides

All guides