Normalize CSV Command
Transform a single raw bank CSV export into standardized normalized format.
Arguments
$1: Path to a raw CSV file (e.g.,data/raw_checkings.csv)
Input Format (Raw Bank Export)
Bank CSVs have varying formats:
Date,Description,Withdrawals,Deposits,Category,Balance
"01/31/2026","DEBIT CARD PURCHASE Amazon Prime*KV2819","$148.32","","Subscriptions","$42,156.78"
Output Format (Normalized)
date,description,category,deposit,withdrawal,balance,account_name
2026-01-31,Amazon Prime Subscription,,148.32,,42156.78,checkings
Normalization Rules
Date Conversion
- Convert MM/DD/YYYY to YYYY-MM-DD (ISO 8601)
- Filter out transactions from previous months
Amount Parsing
- Remove $ symbols and commas
- Withdrawals go in withdrawal column
- Deposits go in deposit column
- Leave blank (not 0) if no value
Description Cleaning
- Remove card numbers (XXXXX1234)
- Remove excess whitespace
- Clean up merchant names
Account Name
- Extract from filename: raw_checkings.csv -> checkings
Workflow
- Read the CSV file path from
$1 - Parse the bank-format CSV
- Apply normalization rules
- Write to normalized_
.csv in same directory - Stop hook validates the output
Usage
/finance-normalize-csv data/raw_checkings.csv
Output: normalized_checkings.csv in the same directory
Related Components
- Agent: finance-csv-normalizer
- Hook: csv-structure-validator