Merge Accounts Command
Merge all normalized_*.csv files in a directory into a single agentic_merged_transactions.csv.
Arguments
$1: Month directory path
Input
Multiple normalized CSV files:
- normalized_checkings.csv
- normalized_savings.csv
- etc.
Output
Single merged file: agentic_merged_transactions.csv
Merge Rules
Combining Records
- Read all normalized_*.csv files
- Concatenate all records
- Sort by date (descending - newest first)
- Preserve account_name to track source
Balance Handling
- Each row keeps its original balance
- Do NOT recalculate balances across accounts
Duplicate Detection
- Warn about potential duplicates
- Do NOT auto-remove (transfers look like duplicates)
Workflow
- Read directory path from
$1 - Find all normalized_*.csv files
- Read and validate each file
- Concatenate all DataFrames
- Sort by date descending
- Write to agentic_merged_transactions.csv
- Stop hook validates output
Usage
/finance-merge-accounts data/january/
Related Components
- Agent: finance-account-merger
- Command: /finance-categorize-csv