group-expense-settlerlisted
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