Use this skill for planning a street's wheelie-bin rota: working out which household wheels the bins out each week from a rota list, a starting household, away households and double (garden bin) weeks. Produces a weekly turn schedule and per-household turn counts. Not for general chore rotas without this rota-and-skip structure.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Bin Rota Plan?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gabrielmoreira-bin-rota-plan-ddf6e53e)
---
name: bin-rota-plan
description: "Use this skill for planning a street's wheelie-bin rota: working out which household wheels the bins out each week from a rota list, a starting household, away households and double (garden bin) weeks. Produces a weekly turn schedule and per-household turn counts. Not for general chore rotas without this rota-and-skip structure."
---
# Bin rota plan
Plan which household takes the bin turn each week, skipping households that are away.
## Inputs
Read `input.json` in the working folder:
- `households`: array of unique names, in rota order (index 0..N-1).
- `startWith`: household whose turn is first considered in the opening week.
- `weeks`: array of `{week, double, away}`, in week order. `double` true means two households are needed; `away` lists households away that week.
If a field is missing, `startWith` is not in `households`, or `away` is absent, treat absent `away` as empty and `double` as false; if `startWith` is invalid, use index 0 and say so in your reply. Never reorder `weeks` or `households`.
## Algorithm
Keep one pointer `p`, an index into `households`. Initially `p = index of startWith`.
For each week, in the order given in `weeks`:
1. `need = 2` if `double` is true, else `1`.
2. Repeat until `need` households are chosen: look at `households[p]`.
- If its name is in this week's `away`, skip it: `p = (p + 1) mod N`.
- Otherwise choose it, append it to the week's list, then `p = (p + 1) mod N`.
3. The week's list is in the order chosen (so a wrap gives end-of-list household before start-of-list household). Never sort.
4. Add 1 to each chosen household's count.
Rules that matter:
- The pointer is NOT reset between weeks. After a week, `p` is the household after the last one that took a turn. Skipped (away) households get no make-up turn; they wait until the pointer reaches them again.
- `startWith` gets no special treatment: if away in week 1 it is skipped like anyone else.
- A household is never chosen twice in one week (the input guarantees enough are at home; with `need` <= households at home, the pointer picks distinct ones). If a week could not be filled after N steps, fill what is possible and mention it in your reply.
- Wrap is `(p + 1) mod N`; with N households, index N becomes 0.
Work week by week, writing down `p` after every week as you go, since you cannot run code. Re-check each week's skips against that week's `away` only (not earlier weeks).
## Outputs (beside `input.json`)
1. `bin-rota.csv`: header line `week,households`, then one row per week in `weeks` order: `<week>,<names>`. Double weeks join the two names with `+` and no spaces, in chosen order, e.g. `12,Okafor+Brennan`. Use the `week` value from the input as given. No quotes unless a name contains a comma (then quote the field). End with a newline.
2. `bin-turns.json`: a JSON object with one key per household, in `households` order, value = number of turns taken in the plan (0 if none). Example: `{"Okafor": 3, "Brennan": 2}`.
## Worked example
Households Okafor, Brennan, Szabo, Liu; startWith Brennan (p=1).
- Week 10 single: Brennan chosen, p=2.
- Week 11 single, Szabo away: skip Szabo (p=3), Liu chosen, p=0.
- Week 12 double: Okafor, then Brennan; p=2.
- Week 13 single: Szabo chosen (his turn came round again).
CSV rows: `10,Brennan`, `11,Liu`, `12,Okafor+Brennan`, `13,Szabo`.
## Final check
Confirm the row count equals the number of weeks, no chosen household was in that week's `away`, the counts sum to the total of 1 per single week plus 2 per double week, and both files are written.