Your AI Money Coach prompt

Four steps. Two minutes. Then you've got a live finance dashboard built from your own numbers.

01Open Claude in Cowork mode

Go to claude.ai/cowork and start a new Cowork session. Cowork is what lets the dashboard talk back to you with the built-in AI coach — a normal chat works too, but you'll lose the in-artifact coaching panel.

02Export your transactions as CSV

From your bank or money app (Copilot Money, Chase, Mint, Monarch, YNAB, etc.) export your transactions as a CSV. More history = better insights. You'll attach this file to the chat.

03Copy the prompt below

Hit the Copy prompt button, paste it into Cowork, and attach your CSV in the same message.

04Send it

Claude inspects your file, builds a self-contained dashboard artifact, and reports what it found. Re-open the artifact and drop in a fresh CSV next month — no need to start over.

Personal Finance Coach — prompt
I'm attaching a CSV file of my financial transactions. I want you to build a **live HTML artifact** I can re-open as a personal finance dashboard. Follow these instructions precisely.

### Step 1 — inspect my CSV first

Before writing any code, read the actual CSV file I've attached. Look at:
- Column headers (they vary by bank/aggregator)
- A handful of sample rows
- Sign convention for `amount` (positive = expense or positive = deposit?)
- How transfers/income are distinguished (separate column? specific category? specific text?)

Common header variants to map automatically:
- **Date**: `date`, `Date`, `Posted Date`, `Transaction Date`, `Trans Date`
- **Merchant/Description**: `name`, `Description`, `Merchant`, `Memo`, `Payee`, `Details`
- **Amount**: `amount`, `Amount`, single column with signed values, OR separate `Debit`/`Credit` columns
- **Category**: `category`, `Category`, `Parent Category` — may be missing entirely
- **Account**: `account`, `Account`, `Account Name`, last-4 mask
- **Type**: `type`, `Transaction Type` — may flag transfers/income vs. regular spending
- **Recurring flag**: `recurring`, `Recurring` — Copilot Money populates this
- **Excluded flag**: `excluded` — Copilot Money has this; ignore those rows

If the CSV doesn't have a category column at all, that's fine — your name-pattern enrichment (step 3) will fill it in.

After inspecting, briefly tell me what format you detected and what assumptions you're making (especially the sign convention).

### Step 2 — build a self-contained HTML artifact

Use the Cowork artifact tool if available. The artifact must:

1. **Always show a CSV upload zone at the top** (drag-drop + click-to-choose, accepts multiple files). The user must be able to drop a fresh CSV in next month and have the dashboard re-render without going back to chat. Data lives in browser memory only — no external uploads.
2. **Be self-contained** — inline CSS/JS, only Chart.js from CDN.
3. **Dark theme** in the style of Copilot Money (deep navy background, card-based layout, rounded corners, subtle borders, accent gradient on the logo). Use a `:root` block with CSS variables for the palette.
4. **Constrain chart heights** — every Chart.js canvas must be wrapped in a container with a fixed pixel height (e.g. `220px`) so PDF/print export doesn't blow up to dozens of pages.
5. Include a `@media print` block that swaps to a light theme and hides the upload zone for clean PDF export.

### Step 3 — name-based enrichment (this is the important part)

Most CSVs leave money sitting in "Other" or "Uncategorized." Use the merchant name to fix this. Build a `PATTERNS` array of regex → category mappings, and apply it to every transaction:

- If the original category is empty / `Other` / `Uncategorized`, REWRITE the category from the matched pattern. Track which were inferred and show a count badge: "Smart re-categorized N of M transactions."
- Always compute a separate `tag` field for cross-cutting groups (Coffee, Streaming, AI Tools, Cash, P2P, Fast Food, etc.) regardless of original category — these power the "Smart insights" widget.

Cover at least these patterns (case-insensitive, word-boundary matching). **Order matters — list more-specific patterns BEFORE broader ones** (e.g. HOA before Utilities, Music & Arts before Online Retail) since first match wins:

- **Cash & ATM** — atm, withdrawal, check, cashier, atm fee
- **P2P Transfer** — venmo, zelle, cash app, paypal inst xfer
- **HOA** — hoa, homeowner, owners assoc, condo assoc, community assoc, master assoc, property owners
- **Property Tax** — county tax, county treasurer, property tax, tax collector, irs treas, franchise tax, state tax, dept of revenue, dept of treasury
- **Solar Loan** — goodleap, sunrun, tesla solar, sunpower, sunnova, solar loan, mosaic solar, loanpal, dividend finance, sungage
- **Auto Loan** — toyota financial, honda financial, gm financial, ally auto, ford motor cred, nissan motor accept, hyundai motor, kia motor, capital one auto, chase auto, bmw financial, mercedes-benz fin, vw credit, subaru motors, lexus financial, acura financial, carvana, credit union auto
- **Tuition** — tuition, university, college, school district, academy, preschool, daycare, montessori, christian school, charter school, private school, kindercare, bright horizons
- **Retirement** — schwab rtrmt, 401k, 403b, ira contrib, fidelity rtrmt, vanguard rtrmt, retirement plan, voya, principal, empower retirement, transamerica, t rowe price, john hancock
- **Home Service** (recurring service person) — gardener, landscap, lawn care, pool service, housekeep, cleaning service, handyman, pest control, hvac service, tree service
- **Phone** — verizon, at&t mobil, t-mobile, sprint, mint mobile, google fi, cricket wireless, visible, us mobile, xfinity mobile, boost mobile, metro pcs
- **Utilities** — sce, edison, pg&e, duke energy, con edison, dominion, xcel energy, so cal gas, socal gas, national grid, water dept, sewer, city of, spectrum, cox, comcast, xfinity, frontier, fios, centurylink, optimum, charter
- **Streaming** — netflix, spotify, hulu, disney+, hbo max, max.com, paramount+, apple tv+, youtube premium, youtube tv, peacock, crunchyroll, prime video, sirius, pandora, audible, fubo, sling tv, discovery+, espn+, apple music, tidal, deezer
- **AI Tools** — openai, anthropic, claude.ai, grok xai, x.ai, cursor, replit, midjourney, perplexity, character.ai, elevenlabs, github copilot, runway, suno, leonardo.ai, stability, poe, mistral, you.com, copy.ai, jasper
- **Software** — adobe, microsoft, github, notion, figma, slack, zoom, google workspace, google one, apple.com bill, icloud, dropbox, evernote, 1password, lastpass, atlassian, canva, calendly, monday.com, asana, trello, airtable, webflow, squarespace, wix, godaddy, namecheap
- **Kids & Activities** (BEFORE Online Retail / Shops) — music & arts, martial arts, karate, taekwondo, gymnastics, dance studio, ballet, sports academy, swim lessons, tutoring, kumon, mathnasium, sylvan, little gym, soccer club, baseball league, scouts, ymca, boys & girls club
- **Coffee & Drinks** — starbucks, dunkin, peet's, philz, blue bottle, jamba juice, boba, sharetea, the coffee bean, caribou coffee, tim hortons, smoothie king, juice it up, 7 leaves, ding tea
- **Fast Food** — mcdonald, burger king, wendy, taco bell, kfc, chick-fil-a, subway, chipotle, in-n-out, panda express, pizza hut, domino, popeye, jack in the box, carl's jr, hardee, arby, sonic drive, five guys, raising cane, whataburger, del taco, jersey mike, jimmy john, qdoba, shake shack, papa john, little caesar
- **Online Retail** — amazon, amzn mktp, ebay, etsy, temu, shein, walmart.com, target.com, costco.com, wayfair, overstock, alibaba, aliexpress, poshmark, mercari
- **Insurance** — geico, state farm, progressive, allstate, liberty mutual, farmers, usaa, rli insurance, metlife, cigna, blue cross, anthem, aetna, kaiser perm, aaa insurance, tesla insurance, nationwide, travelers, the hartford, mercury insurance, esurance, lemonade, american family
- **Home & Property** — apartments.com, property mana, home depot, lowe's, ace hardware, ikea, menards, harbor freight, true value, bed bath & beyond, container store, crate & barrel, west elm, pottery barn, restoration hardware
- **Healthcare** — hospital, medical center, urgent care, walgreens, cvs pharmacy, rite aid, labcorp, quest diagnostics, alma, teladoc, one medical, dental, orthodontic, optometr, vision works, lenscrafters, warby parker, physical therapy, chiropractic, dermatolog
- **Gas** — chevron, shell oil, exxon, mobil, 76 station, arco, valero, bp gas, sunoco, marathon, citgo, conoco, phillips 66, sinclair, costco gas, sam's gas, circle k, 7-eleven
- **Travel** — uber, lyft, airbnb, vrbo, airlines, hertz, marriott, hilton, hyatt, expedia, booking.com, doordash, grubhub, royal caribbean, carnival cruise, norwegian cruise, southwest, united, delta, american airlines, jetblue, alaska air, frontier air, spirit air, enterprise rent, budget rent, avis, kayak, priceline, hotels.com, tsa precheck, global entry, parking
- **Fees** — annual fee, service charge, atm fee, late fee, overdraft, foreign tx, wire fee, interest charge, monthly maintenance, finance charge, returned item, nsf fee, stop payment, paper statement
- **Donations** — church, mission, compassion, salvation army, world vision, red cross, ymca donation, goodwill, st jude, doctors without borders, habitat for humanity, united way, food bank, samaritan, charity, ministr, fellowship, parish
- **Pet** — petsmart, petco, chewy, veterinary, vca, banfield, rover, wag, bark box, pet supplies plus, petfinder, animal hospital
- **Groceries** — kroger, safeway, albertsons, publix, whole foods, trader joe, sprouts, costco wholesale, sam's club, aldi, food lion, h-e-b, wegmans, stop & shop, giant, vons, ralphs, smart & final, instacart, shipt

Add patterns specific to whatever you see in the user's actual data after inspecting it. Common surprises: a recurring named-person payment (likely a contractor → Home Service), a named HOA or community association (→ HOA, not Utilities), a "Goodleap"-style solar loan tagged as Utilities (→ Solar Loan), a named local school or tutoring center (→ Tuition or Kids & Activities, not Other).

### Step 3.5 — split recurring into Cancellable vs Fixed Obligations (critical)

This is the part that most analyses get wrong. Don't put mortgages, HOA, tuition, loans, insurance, utilities, healthcare, kids' activities, or retirement contributions in a "Subscriptions" widget — those are **fixed obligations**, not cancellable.

Define two sets:

**FIXED_OBLIGATION_CATS** (never recommend cancelling):
Mortgage, Tuition, College, Education, Insurance, Auto Loan, Solar Loan, Phone, Utilities, HOA, Property Tax, Healthcare, Kids & Activities, Retirement, Home Service, Taxes, Maintenance.

**CANCELLABLE_SUB_CATS** (true subscriptions / SaaS / streaming):
Subscriptions, Streaming, AI Tools, Software.

**Classification order** (matters):
1. If the smart tag is a fixed-obligation tag → FIXED. (This catches Spectrum, which Copilot Money mis-tags as "Subscriptions" but is really internet/Utilities.)
2. If the original or smart category is a fixed-obligation category → FIXED.
3. If category is Donations → FIXED. (Recurring giving reflects values, not waste.)
4. If recurring amount ≥ $300/month with no clear subscription tag → FIXED. (Mortgages, tuition.)
5. If category or tag is a cancellable-sub category → CANCELLABLE.
6. Default → CANCELLABLE.

**Also exclude these categories from the recurring-detection cadence pass entirely** (they're not subscriptions, just frequent visits):
Restaurants, Fast Food, Coffee & Drinks, Groceries, Gas, Online Retail, Shops, Cash & ATM, P2P Transfer, Travel, Entertainment.

Without this filter the dashboard will tell the user that their favorite local coffee shop is a $5/month subscription because they go there 99 times.

### Step 4 — the dashboard layout

In this exact order:

**Header strip** with title, subtitle, and a Clear-data button (hidden until CSV is loaded).

**Upload card** — always visible. Below it, after first load, show a small "Smart re-categorized N of M" badge.

**Filter bar** — date-range presets (1m / 3m / 6m / 12m / YTD / All / Custom), account dropdown, category-view toggle (Smart / Parent / Raw), exclude-transfers checkbox, exclude-mortgage/tuition checkbox, reset button. Persist filter state via `localStorage`.

**KPI strip — 4 tiles:** Income, Spending, Net cash flow, Top category. Each shows the period total plus a `/month` average underneath.

**Row 1:** Monthly spending line chart (8 cols) + Cash flow doughnut showing income vs. spending (4 cols).

**Row 2:** Top categories (horizontal bar list with icon + name + filled bar + amount, like Copilot Money) + Top merchants (with toggle: sort by $ vs. by visits; show count and avg-per-visit underneath each merchant).

**Row 3:** Subscriptions & recurring + Money-leak watch.
- Subscriptions widget: combine four signals — anything flagged in the CSV's `recurring` column, anything in a "Subscriptions" category, anything matching the Streaming/AI Tools/Software pattern tags, plus cadence-detected (3+ hits at similar amount with 20-45 day gaps). Deduplicate by merchant name. **Then split into two visible sections inside the widget**: "Cancellable subscriptions" (true SaaS / streaming / discretionary recurring) and "Fixed obligations" (mortgages, HOA, insurance, loans, kids' activities, retirement, etc. — see Step 3.5 classification rules). Show monthly totals for each section in the widget header.
- Money-leak watch: aggregate Fees, Cash & ATM, P2P Transfer tags. Show count and total per group, plus a grand total at the bottom.

**Row 4:** Smart insights (pattern-tag totals — Coffee, Streaming, AI Tools, Fast Food, etc.) + AI Coach panel.

### Step 5 — AI Coach panel

If `window.cowork.askClaude` exists, expose four buttons. Each button calls `await window.cowork.askClaude(prompt, [summary])` where `summary` is a JSON object. **Never send raw transactions.**

The summary object should include:
- `filterRange`: `{from, to, monthsCovered}` so the AI knows the period
- `totals`: `{totalIncome, totalSpending, netCashFlow, avgIncomePerMonth, avgSpendingPerMonth, incomeToSpendingRatio, possibleRealEstateFlow}` — the last flag is true when mortgage+HOA+property-tax > 30% of spending AND the income/spending ratio is within 15% of 1.0 (signals likely rental property pass-through)
- `monthly`: per-month income/spending/net array
- `categories`: top 16 with `{category, total, avgPerMonth}` — pre-computed so the AI doesn't recompute and get wrong numbers
- `topMerchants`: top 15 with `{merchant, total, visits, avgPerVisit}`
- `cancellableSubscriptions`: list with `{name, amount, hits, lastSeen, category, origCategory, tag, sources}`
- `fixedObligations`: same shape as above (so the AI can see them but knows not to suggest cutting them)
- `smartTagTotals`: tag → total, sorted descending
- `leakDetails`: `{[tagName]: [{date, name, amount, category, tag, account}, …]}` — every individual transaction for Cash & ATM, Fees, and P2P Transfer in the selected range, capped at ~60 per tag. This is the critical drill-down field — without it the AI can only quote aggregates and will admit "I don't have transaction-level detail" when the user asks for a breakdown.
- `notes`: an object with `possibleRealEstateFlow` explanation, `categoryDefinitions` explaining smart vs raw, and `doNotRecommend` listing what the AI must not suggest cancelling

**Question-aware drill-down for chat follow-ups (important):**

When the user types into the chat box, do NOT just send the summary. Also build a `questionRelevantTransactions` array by scanning the question for:
1. Tag names (e.g. "Cash & ATM" matches keywords cash/atm/withdraw)
2. Category names (smart or original) appearing in the question — minimum 4 chars to avoid noise
3. Merchant first-words appearing in the question (look at top 200 merchants by frequency, take the first word ≥ 4 chars)
4. Common explicit terms: fee, overdraft, interest, venmo, zelle, paypal, refund, pending

Filter the user's currently-visible transactions against those matchers and include up to 50 in the data array as a separate object. Pass to askClaude as `[summary, { questionRelevantTransactions: [...] }]`.

Then in the prompt, tell the AI: *"questionRelevantTransactions are actual transactions matching the user's question — use them for specifics like dates, merchants, amounts."*

Without this, follow-up questions like *"break down what the cash drain was"* get answered with generic "the data doesn't have that granularity." With it, the AI quotes actual dates and amounts.

**Every prompt must include a "GROUND RULES" preamble** that says:
1. The data has TWO recurring lists: `cancellableSubscriptions` and `fixedObligations`. NEVER recommend cancelling anything in `fixedObligations` — those are committed.
2. Use `filterRange.monthsCovered` and `categories[].avgPerMonth` for averages. Don't invent numbers.
3. Identify what fixed-obligation items are (HOA, mortgage, tuition, solar loan, home service, retirement contribution) based on category/tag. Don't call them "unclear" or recommend cancelling.
4. If `notes.possibleRealEstateFlow` is true, mention that the user may have rental properties and the income/spending may largely net out. Don't conclude they're insolvent without that hypothesis.
5. Reference actual merchant names. Be specific with $ amounts from the data.

The four buttons:
- **Analyze spending** — 2-3 specific discretionary patterns with $/month savings, one trend, one positive habit.
- **Suggest budget** — Table: Category | Current avg/mo | Suggested | Note. Mark obligations as "fixed — keep". Cuts only on discretionary categories. Include rationale paragraph.
- **Review subscriptions** — ONLY operates on `cancellableSubscriptions`. Buckets each as KEEP / CONSIDER CANCEL / OVERLAP. Lists fixed obligations briefly at the bottom for transparency. Total monthly savings estimate.
- **Find leaks** — Looks at smart-tag totals for Fees, Cash & ATM, P2P Transfer; high-visit/low-avg merchants (impulse signal); coffee + fast food totals. 2-3 concrete habit changes.

**Button active state:** all four buttons share the same neutral styling (`.coach-action`) and only the most recently clicked one gets `.active` (accent blue background). Clicking a different button moves the highlight; clicking the same button keeps it. Don't hardcode "Analyze spending" as default-active — leave nothing highlighted until the user clicks.

**Free-form chat box (required, below the buttons):**

The user can type any follow-up question — *"why is my March spending high?"*, *"what's that recurring HOA charge?"*, *"break down my cash withdrawals"*, etc.

Behavior:
1. Maintain a `coachHistory` array — each entry is `{type: "action"|"question", label, content, loading}`.
2. Every button click and every chat submission appends entries to history. **Never clear** on a new action — the history is a running session log.
3. Each history entry shows a role label (Coach / You) and the content. Style user-question entries differently from coach responses.
4. Provide a small "Clear history" button (with confirm) that's visible only when history exists.
5. The chat input auto-grows up to ~120px. Enter sends, Shift+Enter inserts a newline.

**Frozen layout (critical UX):**

The AI Coach card must be a fixed-height flex container with three regions — the user must be able to scroll long history without losing access to the buttons or chat input.

```
┌──────────────────────────────────┐
│  TOP (frozen, no scroll):        │
│  Title + buttons + helper text   │
├──────────────────────────────────┤
│                                  │
│  MIDDLE (scrollable):            │
│  Conversation history grows here │
│  Auto-scroll to newest on append │
│                                  │
├──────────────────────────────────┤
│  BOTTOM (frozen, no scroll):     │
│  Chat input + Send + status      │
└──────────────────────────────────┘
```

Implementation:
- Coach card: `display: flex; flex-direction: column; height: 600px; padding: 0; overflow: hidden;`
- Top section: `flex: 0 0 auto;` with its own padding
- Middle (scroll container): `flex: 1 1 auto; overflow-y: auto; min-height: 0;` (the `min-height: 0` is required for the flex child to shrink properly)
- Bottom section: `flex: 0 0 auto;` with its own padding
- On every history append: `scrollContainer.scrollTop = scrollContainer.scrollHeight;` to pin newest to bottom
- `@media print` rule: set `coach-card { height: auto; overflow: visible; }` and `coach-scroll { overflow: visible; }` so PDF export shows the full conversation
- When history is empty, show an empty-state message in the scroll area ("No conversation yet — click an action above or ask a question below")

Without this layout, a 10-message conversation pushes the chat input completely off-screen on small displays. The frozen layout keeps both the action buttons and the input always reachable regardless of how long the conversation gets.

**Context preservation in prompts:**

Both `runCoachAction(actionKey)` and `runCoachChat(question)` must build a `buildHistoryContext()` string from the last 6-8 history entries (oldest→newest, formatted as `[Coach action: <label>]\n<content>` and `[User asked]\n<content>`). Include that in the prompt sent to `askClaude` so the model sees what was just discussed.

Prompt skeleton for both paths:

```
GROUND RULES
...

PRIOR DISCUSSION IN THIS SESSION (the user is following up on this — keep continuity):
[history transcript]

NEW REQUEST / USER'S QUESTION:
"..."

Answer based on the JSON summary AND prior discussion. If the question references a previous response, build on it — don't restart. If the data doesn't have what's needed, say so directly.
```

This is what makes the chat box useful — without history context, every follow-up would feel disconnected. The conversation history goes in the prompt text (not in the data array). The data array passed to `askClaude` is `[summary]` for action-button calls, or `[summary, { questionRelevantTransactions: [...] }]` for chat calls when keyword matching found relevant transactions. Never include raw transactions beyond the curated `leakDetails` and `questionRelevantTransactions` fields — keep the payload focused.

If `window.cowork` isn't available, show a friendly message saying the coach only works inside Cowork.

### Step 6 — sanity-check before delivering

Before saving the artifact, validate against the actual data and report:

1. **Parser sanity**: total transactions, date range covered, count of accounts.
2. **Enrichment proof**: how many transactions got smart re-categorized from Other/Uncategorized; top 5 smart tags by total; sample of 5 items that got upgraded (so the user can spot-check).
3. **Subscription split**: count and total $/mo for cancellable vs fixed-obligation lists. Both should be non-zero on a typical household budget.
4. **Leak detail**: confirm `leakDetails` has at least Cash & ATM and Fees populated (or note honestly if the user has zero of those).
5. **Layout sanity**: every chart canvas wrapped in fixed-height container; AI Coach card uses fixed height with flex column layout (top frozen, middle scrolls, bottom frozen).
6. **Upload zone**: still visible and working after first load.

Then save the artifact and report to the user:
- Format detected (which CSV variant)
- Total transactions parsed and date range
- Count of auto-recategorized transactions
- Top categories worth investigating
- Anything weird worth flagging (suspicious recurring items, unusual income/spending ratio that might indicate rental properties, etc.)

Tip: paste the prompt and attach your CSV in the same message so Claude can inspect the file before it builds.