split bills for ai edge gallery. use when the user wants to divide a receipt or bill across named people, accept bahasa indonesia or english input, support natural-language notes, receipt ocr text from a bill photo, discount, service charge, tax, tip, optional rounding, and reimbursement flows such as 'ayu bayar budi rp45.000'.
Resources
2Install
npx skillscat add jarwoethes-jpg/split-bills-v3 Install via the SkillsCat registry.
SKILL.md
Split bills v3
Workflow
- Decide the input mode.
- Structured JSON already known: pass the JSON directly.
- Natural language in English or Bahasa Indonesia: pass the text directly.
- Bill photo provided: pass the image as
receiptImageDataUrl,receiptImageBase64, orreceiptImageUrl. The skill will try OCR first, then run the same accounting engine on the extracted receipt lines.
- Let
scripts/split-bills.jsbe the single accounting engine. - Ask one short follow-up instead of guessing when people or item ownership are still missing.
Call run_js
Use these exact parameters:
- script name:
index.html - data: one of:
- a JSON string, or
- a plain-text multiline bill description
Supported JSON fields
people: array of person namesitems: array of objects with:name: stringamount: numberassignedTo: array of person names
text: optional natural-language bill notes in English or Bahasa IndonesiaocrTextorreceiptText: optional receipt lines, either user-provided or produced by OCRreceiptImageDataUrl,receiptImageBase64,receiptImageUrl: optional bill image inputs for OCRcurrency: optional ISO currency code, defaults toIDRlanguage: optionalenoriddiscountPercent,discountAmountservicePercentorserviceChargePercentserviceAmountorserviceChargeAmounttaxPercent,taxAmounttipPercent,tipAmountrounding: optional rounding increment such as500or1000paidBy: one person paid the full totalpayments: explicit per-person payments that must sum to the grand total
Supported text patterns
People
people: Ayu, Budi, Citraorang: Ayu, Budi, Citra
Item lines with amount
Ayu had nasi goreng 60000Ayu makan nasi goreng 60.000Budi and Citra shared sate 90000Budi dan Citra patungan sate 90.000Es teh 30000 for allEs teh 30.000 buat semua
OCR receipt lines
Use these when a bill photo was transcribed first:
Nasi goreng 60000Sate 90000Es teh pitcher 30000Pajak 10%Service charge 5%Diskon 20000
Then optionally add ownership or payer lines:
Ayu makan nasi gorengBudi dan Citra patungan sateEs teh pitcher buat semuaAyu bayar semua
Payment lines
Ayu paid allAyu bayar semuaBudi paid 50000Budi bayar 50.000
Totals and adjustments
Tax 10%Pajak 10%Tip 5%Discount 20000Diskon 20.000Voucher 10%Service charge 5%Biaya layanan 7,5%Round 500Pembulatan 1000
Important rules
- Use
paidByfor the common one-payer case. - Use
paymentswhen multiple people already paid. - Do not provide both at once.
- Rounding is only a suggestion layer on top of exact accounting; totals must remain exact.
- Discounts are applied before service charge, tax, and tip.
- Service charge is added before tax and tip are calculated.
- For receipt OCR, preserve uncertainty instead of inventing values. Ask one short follow-up if the image text is still unclear.