RU
🗂️ Personal Systems· updated

I Built a Budget App. A Reminder and a Screenshot Beat It

Seven iterations of a daily spending habit with Claude Code. Email parsing, a statement parser and a native iOS app with a widget all lost to a 10am reminder and one screenshot of yesterday in my banking app.

At 10:00 my phone shows one reminder: yesterday’s spending, what’s left for the week and the month, and “open /budget”. I open it, send Claude a screenshot of yesterday in my banking app, and a minute or two later I know where the money went and whether the thing I want can wait.

I got there on the seventh try. One of the six I threw away was a native iOS app with a widget and a Live Activity. The reminder beat it.

If you’ve installed a budget app and stopped opening it, or tried to track spending from email and noticed the café never sends one, this is for you. It helps if Claude Code already runs on your Mac.

What I wanted

A notification every day. I open it, we look at what I spent, what I still want to buy and how much is left, and we decide. A conversation instead of a dashboard.

I already had the pieces from my life-admin assistant: Claude Code on my Mac, a Markdown vault, a headless run every three hours that reads my mail. I assumed spending would take an evening.

Seven iterations

  1. 1

    August

    A one-off analysis of bank statements

    Found real problems and set limits. Nothing enforced them, and two months later I had broken them.

  2. 2

    September

    Spending from email, in the 3-hour sweep

    Card payments in shops and cafés never send an email.

  3. 3

    October, night 1

    A parser for the bank's PDF statement

    Matches the statement totals to the cent. But the statement arrives once a month.

  4. 4

    Night 2

    A CLI, a /budget command and an evening notification

    The macOS notification stayed on the Mac, and 9pm is too late to change a day.

  5. 5

    Morning 2

    Apple Reminders at 10:00

    iCloud syncs it to the iPhone. Kept.

  6. 6

    Evening 2

    A native iOS app with a widget and Live Activity

    Ran in the simulator. I couldn't get it onto my phone that week, and the reminder already did the job.

  7. 7

    Day 3

    Screenshot → /budget → Claude parses it

    One picture covers card, Apple Pay, transfers and direct debits. Kept.

Orange survived. The final version still depends on lessons from the grey steps.

I trusted email because it was already automated. The money that leaks out quietly goes on the €4 coffee and the €11 lunch, and neither writes to you. I had the data that was easy to get.

The app hurt more. I built a proper SwiftUI app in an evening: a lock-screen widget with remaining limits, a Live Activity for the morning, a one-tap screen for “groceries or café?”. It worked in the simulator. While I couldn’t install it, I kept using the reminder, and after a few days I noticed I didn’t miss the app. A reminder plus a chat already did everything it did.

The flow that stuck

The whole morning in 20 seconds, recorded in the iOS Simulator. A reenactment with made-up numbers: the real one has my real money in it. It still shows the daily allowance, which I dropped a day after publishing.
  1. 10:00. launchd runs a script that asks budget.py --notify for one line of numbers, deletes the previous budget reminder and creates a new one. iCloud delivers it to the phone.
  2. On the phone I open my Remote Control session to the Mac in the Claude app and run /budget with one screenshot of yesterday attached.
  3. On the Mac, Claude saves the picture to an Inbox folder and runs the ingest script. That script hands the image to a separate claude -p call, adds the new transactions, skips the ones already recorded and queues questions for anything it can’t categorise.
  4. Then we talk: what’s left, what I want, what can wait. Claude checks each wish against the purchase rules in my Budget.md and logs the decision there.
Claude app · /budget

/budget [screenshot]

save Inbox/2026-10-20_064812-1.pngProcessInbox.shbudget.py --spent yesterday

Added 4, already had 2, 1 question.
Yesterday €23: groceries €14, café €9.
Free money this week: €104 left of €150.
“Corner Deli €9”: café or groceries?

café. also thinking about new headphones, ~€180

answer → MerchantRules.jsonread Budget.md: purchase rules

Saved: Corner Deli is a café from now on.
Headphones: not this week, they'd eat all the free money and more. Your rule: anything over €100 waits a week. On the wish list with “decide after 27 Oct”.

The morning ritual. Numbers and the purchase rule are invented; the shape is real.

No API keys and no server. Parsing runs on my Claude subscription through claude -p on the Mac, like the rest of my assistant.

The parts that took real thought

Two overlapping receipt cards clicking together like puzzle pieces, their matching rows glowing, while a hand sets an identical duplicate card aside into a tray

Relative dates. A banking screenshot says “Today” and “Yesterday”. The ingest script takes the date the picture was taken from the file name, falls back to the file’s creation date in Spotlight metadata, and passes it into the prompt. The model gets only the Read tool:

ingest.py (core)
PROMPT = """Read {path}: a screenshot or photo of a banking app, or a statement. It was taken on {taken}.
Output ONLY a JSON array of transactions:
[{{"date":"YYYY-MM-DD","merchant":"...","amount":12.34,"direction":"out|in","category":"...","confidence":0.0}}]
- Resolve relative dates (Today, Yesterday, weekday names) from the date the picture was taken.
- Include pending transactions. Skip balances and totals."""
out = subprocess.run([CLAUDE, "-p", PROMPT.format(path=src, taken=taken_at(path)),
"--allowedTools", "Read", "--model", "sonnet"], ...)

Photos from the iPhone camera arrive as HEIC, which Read doesn’t open, so the script converts them to JPEG with sips first.

Duplicates. Screenshots overlap: yesterday’s still shows the day before, and the monthly statement lands on top of a month of screenshots. I wanted to match on date, amount and merchant. That broke on the first statement, because the same shop has one name in the statement and another on the screen. So the key is date and amount, counted:

ingest.py (core)
def merge(ledger, new_rows, rules, source, fname):
# Key without merchant: names differ between statement and screenshot.
# Known trap: two different purchases of the same amount on the same day.
have = Counter(key(r["date"], r["amount"]) for r in ledger)
seen = Counter()
for r in new_rows:
k = key(r["date"], r["amount"])
seen[k] += 1
if seen[k] <= have[k]:
continue # already recorded
...

Two identical coffees in a screenshot and one in the ledger adds exactly one. I kept the trap from the comment on purpose. It only bites when a new file shows the second purchase without the first, and if the ledger ends up one short, the statement adds the missing row when it arrives.

Where the statement wins. Email receipts don’t line up with the bank: one online store bundles orders into a single charge and pays partly from refund balance. So for every day the PDF statement covers, budget.py ignores email receipts. Statement and screenshot rows live in the same ledger and already went through the dedup above.

Questions become rules. Claude asks only when no merchant rule matches and its confidence is below 0.8. Anything under €2 counts as free money without asking. My answer goes into MerchantRules.json, applies to that merchant’s past transactions too, and the question doesn’t come back. For one-offs I say “don’t remember”, and no rule gets saved.

Four days of real mornings

I dropped the daily number. The reminder used to say “today you can spend €31”. I broke that number on at least half the days, and a limit I break every other day stops being a limit. The day after publishing I took it out. Now the reminder shows yesterday and what’s left for the week and the month.

Correct, and useless. On the day of a birthday dinner the reminder said “yesterday €21”. I had spent €283. The €21 was right: groceries €15 and free money €6, the only parts that count against my weekly limits. The dinner and the cake were one-offs, the rest were bills. The script answered a narrower question than the one I ask in the morning, so now the total comes first: “Yesterday €283 (groceries €15, free €6)”.

iCloud evicted my data. On 21 and 23 October the reminder read “script crashed”. Optimize Mac Storage had moved the CSV of email receipts off the disk, and a launchd job can’t download an evicted file back: open() fails with EDEADLK, “Resource deadlock avoided”. After the first crash I added retries. On the 23rd the job tried five times, a minute apart, and failed the same way every time. The error log lived in iCloud as well, so it had been evicted too.

The fix is boring. Email receipts are now an optional source: if the file isn’t on disk, the reminder is computed without it and says so. Errors go to ~/Library/Logs. Setting Keep Downloaded on the folder should prevent the eviction in the first place; I haven’t turned it on yet.

“Are you counting all this in Excel? So it’s not by guesswork.” That was my question to Claude, and a fair one for a number that decides whether I buy something. Every run now also writes Budget.xlsx: one row per transaction, weekly and monthly sheets built with SUMIFS formulas. Claude recalculated it in LibreOffice and it matched the script to the cent.

What I’d do differently

I’d live with the reminder for a week before building anything with a widget. That would have saved me an evening. The ugly version works because it shows up every day in a place I already look.

I’d also start from the data that matters. Email was automated and useless for daily spending; a screenshot is manual and complete.

The split between model and code held up. Claude reads messy screenshots and talks me out of headphones. Totals, dedup and the statement parser are plain Python with --selftest.

Build your own: paste this into Claude Code

prompt.md
Help me build a daily budget habit on this Mac. Step by step, ask before anything irreversible.
1. Create ~/Vault/Finance/Budget.md with weekly limits (groceries, free money), fixed costs,
purchase rules (e.g. wait a week for anything over a threshold), a wish list and a decisions log.
2. Write a stdlib Python budget.py: yesterday / this week / until payday from a Ledger.csv (no daily allowance),
a --notify mode that prints one line, and --spent yesterday|week|month. Include --selftest.
3. Write ingest.py: for each file in ~/Vault/Finance/Inbox, parse screenshots with `claude -p --allowedTools Read`
(convert HEIC to JPEG first; resolve Today/Yesterday from the date the picture was taken),
dedupe by (date, amount) with counts, ask a question when the category is uncertain
and remember the answer per merchant.
4. A launchd job at 10:00 that creates an Apple Reminder "Budget: <budget.py --notify>" with the note
"Open /budget and send yesterday's bank screenshot", deleting the previous one.
If launchd can't read iCloud Drive, wrap the script in an app with Full Disk Access.
A launchd job can't download files iCloud has evicted: make optional sources skippable and log outside iCloud.
5. A /budget slash command that processes the Inbox, shows what's left in 3–5 lines,
asks pending questions and runs anything I want to buy through the purchase rules.