Home/Automations/Expense Categorization
BeginnerSaves 3 hrs/month

Expense Categorization

Bank export to categorized spreadsheet

The problem

You manually categorize hundreds of transactions every month from your bank export.

The outcome

A categorized spreadsheet with totals per category, flagged anomalies, and month-over-month trends.

What you need

Step by step

01

Create your project folder

bash
mkdir ~/expense-categorization
cd ~/expense-categorization
02

Export your transactions

Download a CSV from your bank or credit card. Most banks have an "Export" or "Download" option in transaction history. Drop it in the folder.

03

Create the CLAUDE.md file

Create the CLAUDE.md file with the instructions below, or download it from the Downloads section.

04

Run it

bash
cd ~/expense-categorization
claude

Then tell Claude what to do:

Categorize all the expenses in the CSV file.
05

Review categories

Check the output. If Claude miscategorized something, mention it — "Uber should be Travel, not Food" — and it will learn for next time if you add that rule to your CLAUDE.md.

The CLAUDE.md file

Copy this into a file called CLAUDE.md in your project folder.

CLAUDE.md
# Expense Categorization

Read the CSV file in this folder (bank/credit card export).

## Categories
Categorize each transaction into one of these:
- Payroll
- Software & Subscriptions
- Travel
- Food & Meals
- Office Supplies
- Marketing & Advertising
- Professional Services
- Utilities
- Insurance
- Other

## Rules
- Amazon purchases: categorize as Office Supplies unless description mentions a specific category
- Uber/Lyft: Travel
- Restaurant names: Food & Meals
- Monthly recurring charges: Software & Subscriptions

## Output
Create two files:

### categorized_expenses.csv
The original data with an added "category" column.

### expense_summary.md
A markdown report with:
- Total spend by category (table, sorted highest to lowest)
- Month-over-month comparison if multiple months present
- Top 10 largest individual expenses
- Any flagged items (transactions over $500, or items categorized as "Other")

Format currency with $ and commas.

Customization ideas

Related automations