Prompt file imported from Akshats-git/Agentic-Coding-Using-Claude-Code (
.claude/commands/seed-expense.md). Fill in{{arguments}}before use. Copyright stays with the author.
Arguments received: {{arguments}}
Spendly lives in Expense-Tracker/ in this repo — all paths below are
relative to that folder, and any script must run with its venv active
(cd Expense-Tracker && source venv/bin/activate).
- Parse
{{arguments}}into three integers, in this order:user_id,count,months_back. If any of the three cannot be parsed, stop and print the expected usage:/seed-expense <user_id> <count> <months_back>— do not guess missing values. - Read
Expense-Tracker/database/db.pyfor theexpensesschema, theCATEGORIESlist, andget_db(). Reuseget_db()rather than opening a new connection. - Verify the
user_idexists inusers. If it does not, stop and say so — do not create expenses for a user that does not exist. - Write and run a Python script that inserts
countexpenses for that user:- Spread the
datevalues roughly evenly across the lastmonths_backmonths (today going backwards). - Distribute
categoryroughly proportionally across all eight categories inCATEGORIESrather than picking one category repeatedly. - Pick a realistic
amountper category using sensible ₹ ranges (for example Food ₹50–800, Health ₹100–2000, Bills ₹200–3000) — do not use the same amount twice in a row. - Give each expense a short, realistic
description.
- Spread the
- Print a summary: how many expenses were inserted, for which user, and the date range they span.
Do not touch any file other than running this one-off script. Do not run any
git commands.
