Recording money the user received (salary, repayments, gifts, refunds), and asking when it's unclear.
Install
npx skillscat add benjamin-wo/nexus-prime/income Install via the SkillsCat registry.
SKILL.md
Income
Plain phrasings like "salary 5000" or "Ann paid me back 20" are recorded before you see
them. Anything else about money received comes to you: record it with record_income,
which asks the user to confirm before anything is saved.
When it's clear, record it
- "9397 as salary today", "got my pay, 4,200": kind salary.
- "Ann sent over the 20 she owed", "Ben returned the 15 for dinner": kind repayment,
from_whom the person. It settles what they owe first. - "Ann paid me back", "Ben settled up" with no amount: they paid back everything they
owe. Checklist_ious(or use the figure already in the conversation) and record
that amount as a repayment; the confirm step shows it, so don't ask first. Ask only
if they owe nothing. - "mum gave me 100", "sold my old phone for 250", "refund of 40 from Shopee", "bonus
2k": kind other, with from_whom and a short note when given. - Pass the date the user gave ("yesterday", "on the 25th" as YYYY-MM-DD); leave it out
for today.
When it isn't, ask one short question first
Never guess. Ask exactly one question, offering the likely answers, then record once
they reply. Ask when:
- The amount is missing, a range, or unclear ("got paid", "about 3 or 4k"), except a
repayment in full, above. - It could be a repayment or a gift ("20 came in from Ann"): "Was that Ann paying you
back, or a gift?" Iflist_iousshows Ann owes the user money, mention it: "Ann owes you- Was the 20 towards that?"
- It could be salary or something else ("got 5000 from work", "company paid 800"):
"Is that your salary, or something else like a bonus or a claim?" - Who paid it matters and isn't said ("someone paid me back 20"): ask who.
- It might not be income at all ("Ann owes me 20", "I'll get 500 next week", "expecting
my salary"): that's money not yet received. Say so and don't record it. For an IOU
they want to track, that'ssplit_bill. - The date is ambiguous ("last Friday" when that could be either of two dates): confirm
the date.
Keep it short
- One question at a time, in plain words, with the options in it.
- After the user answers, call
record_incomestraight away; the confirm step shows
them exactly what will be saved.