What the source did
- Imports budgeting-app CSVs into an hledger journal using rules the agent helped write.
- Asks Claude to read a trip note plus daily notes and find every matching transaction, including flights booked weeks earlier.
- Confirms the ambiguous ones by hand; Claude tags the rest and appends an Expenses table to the note.
- Runs a Sunday report headless with claude -p, scoped to two folders and only Read, Write and hledger.
“The prompt is the specification.”— mandalivia.com, Blog
Summary written by Agent Cookbook from the original post. See the original for the full context. How we source recipes
Our notes
- What it takes
- Claude Code, hledger, an Obsidian vault and bank CSV exports, with the journal in git.
- Where it breaks
- Misspelled tags splitting totals, and loose import regexes matching too much.
- Human checkpoint
- You confirm the ambiguous transactions before anything is tagged; commit before any reimport.
- Tools involved
- Claude Code, hledger, Obsidian vault, bank CSV export
✓ Verified Source link checked and still live. Notes by Thomas, editor. How we verify
Their prompt
From mandalivia.com Their exact wording. Source ↗
Approval rule
Set it up
- Keep the journal in git; commit before every session.
- Write a README in the finance folder with tag conventions; the agent reads it first.
- Run the prompt, review the ambiguous list, confirm.
- Query later with hledger bal tag:trip=...
Common failures
- Misspelled tags quietly split totals. Use one case convention.
- Unanchored regex in import rules matches too much (NA matches 'Donations').
Variations
- Weekly report via claude -p with --allowedTools 'Read,Write,Bash(hledger:*)'.
- Tag hosted visits or home projects the same way.
Get the 10 best agent setups. Free.
Plus new recipes every week. One email, no spam.
Unsubscribe anytime. Privacy