← ClaudeAtlas

group-expense-settlerlisted

Split group expenses fairly (equal or weighted shares) and compute the minimum number of money transfers to settle up. Reads a simple ledger of who paid for what, handles non-even splits, weights, and shared vs personal items, then produces an optimal settlement plan (who pays whom, how much) plus a fairness audit. Use when settling trip costs with friends, splitting rent and utilities among roommates, or running any shared-expense pool without a dedicated app.
voronindenis5/group-expense-settler · ★ 0 · AI & Automation · score 76
Install: claude install-skill voronindenis5/group-expense-settler
# Group Expense Settler 👥💰 You went on a trip with five friends. Everyone paid for something — hotels, gas, dinners, tickets. Now there's a tangle of "I paid for you there, you paid for me here" that nobody can untangle. This skill reduces the whole mess to **the fewest possible payments that make everyone whole**. ## Overview Settling shared expenses has two separate problems, and most people conflate them: 1. **Fairness** — how much *should* each person have contributed? (Split a dinner 5 ways; the grocery run only 3 ways; the rental car by days present.) 2. **Settlement** — given what everyone actually paid vs. their fair share, what's the cheapest set of transfers to square everything? For #2 the naive approach ("everyone who underpaid pays the person who overpaid the most") generates O(n²) transfers. The **min-cash-flow** algorithm — greedy matching of the largest creditor against the largest debtor — provably needs at most **n−1 transfers** and typically far fewer. For a 6-person trip: 15 possible payment edges → usually **4 or 5 actual transfers**. `scripts/settle_up.py` implements: - Ledger format: `payer,amount,people...` (+ optional `--weights` or per-item exclusions) - **Net-position math**: for each person, `paid − fair_share = net`. Positive net = is owed money; negative = owes. - **Min-cash-flow settlement** (max-creditor ↔ max-debtor greedy, exact to the cent, no rounding residue) - Fairness audit table: paid / share / net per person - T