💰

Budget Tracker

Verified

by Community

Maintain a simple expense tracker in the workspace. Log expenses, categorize spending, calculate totals, and generate spending summaries.

budgetexpensesfinancetracking

Budget Tracker Skill

Track expenses in the workspace.

Add Expense

mkdir -p ~/workspace
echo "$(date +%Y-%m-%d),{amount},{category},{description}" >> ~/workspace/expenses.csv

View Summary

python3 -c "
import csv
from collections import defaultdict
totals = defaultdict(float)
with open('$HOME/workspace/expenses.csv') as f:
    for row in csv.reader(f):
        if len(row) >= 3:
            totals[row[2]] += float(row[1])
print(f'{'Category':20s} {'Amount':>10s}')
print('-' * 32)
grand = 0
for cat, amt in sorted(totals.items(), key=lambda x: -x[1]):
    print(f'{cat:20s} ${amt:>9.2f}')
    grand += amt
print('-' * 32)
print(f'{"TOTAL":20s} ${grand:>9.2f}')
"

Categories

Common: Food, Transport, Housing, Entertainment, Shopping, Utilities, Health, Education

Notes

  • CSV format: date, amount, category, description
  • Expenses persist across conversations
  • Use consistent category names for accurate summaries