Use this skill when the user wants a bin rota, bin-duty or wheelie-bin turn plan for a street or cul-de-sac: one household wheels all the bins out each week, double weeks (garden bins) need two households, households that are away get passed over, and per-household turn counts are needed. Reads input.json (households, startWith, weeks) and writes bin-rota.csv and bin-turns.json. Not for general rotas with make-up turns or unrelated scheduling.
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-04950d96)
---
name: bin-rota-plan
description: "Use this skill when the user wants a bin rota, bin-duty or wheelie-bin turn plan for a street or cul-de-sac: one household wheels all the bins out each week, double weeks (garden bins) need two households, households that are away get passed over, and per-household turn counts are needed. Reads input.json (households, startWith, weeks) and writes bin-rota.csv and bin-turns.json. Not for general rotas with make-up turns or unrelated scheduling."
---
# Bin rota plan
Builds a weekly rota from `input.json` by walking round a fixed household list, skipping households that are away.
## Inputs
Read `input.json` in the working folder:
- `households`: array of unique names, in rota order (index 0 to n-1).
- `startWith`: household whose turn comes up in the first week.
- `weeks`: array of `{week, double, away}` in week order. `double` is true/false; `away` is an array of names (may be empty).
If `startWith` is not in `households`, or a field is missing, do not guess silently: use index 0 for a missing/unknown `startWith`, treat a missing `away` as empty and a missing `double` as false, and note it in your reply. Names in `away` that are not in `households` are ignored.
## Algorithm
Keep one pointer `p`, the index of the household whose turn is next. Start with `p = index of startWith`.
For each week, in the order given in `weeks` (never re-sort):
1. `k = 2` if `double` is true, else `k = 1`.
2. Scan candidates `j = p, p+1, p+2, ...`, using household index `j mod n` (wraps from the end of the list back to 0).
3. Take a candidate if it is not in that week's `away` list; skip it otherwise. Stop when `k` households are taken. Taken households are recorded in the order reached, so a wrap-round gives the end-of-list household before the start-of-list one. Never take the same household twice in one week (scan at most n candidates; the input guarantees enough are at home).
4. Set `p = (index of the last household taken + 1) mod n`.
5. Skipped households get no make-up turn: the next week simply continues from the new `p`. Away status is judged only for the current week.
`startWith` gets no special treatment: if away in the first week, it is skipped like anyone else.
Track a count per household: add 1 for each time it is taken.
## Output
Write both beside `input.json`.
**`bin-rota.csv`**: header line `week,households`, then one row per entry in `weeks`, in the same order. The `week` value is copied exactly from input. Single week: the household name. Double week: `First+Second` with no spaces, in the order reached (not alphabetical). No quotes, no blank lines, newline after each line.
**`bin-turns.json`**: one JSON object, keys in `households` order, values the integer turn counts, 0 for households with no turns. Use 2-space indentation. Every household appears, and the counts sum to the total of 1 per normal week plus 2 per double week.
## Steps
1. Read `input.json`.
2. Work through each week with the algorithm, writing down `p`, who was skipped and who was taken as you go (keep a running table; do not do it in your head for long inputs).
3. Write `bin-rota.csv` and `bin-turns.json`.
4. Check: row count equals number of weeks; each double row has two distinct names; no taken household was in that week's `away`; counts total correctly.
## Worked example
Households: Okafor, Brennan, Szabo, Liu; startWith Brennan. Indexes 0-3, `p = 1`.
- Week 10 (single, none away): take Brennan (1); `p = 2`.
- Week 11 (Szabo away): skip Szabo (2), take Liu (3); `p = 0`.
- Week 12 (double): take Okafor (0), Brennan (1); `p = 2`.
- Week 13: Szabo (2) is at home, take Szabo.
CSV rows: `10,Brennan` / `11,Liu` / `12,Okafor+Brennan` / `13,Szabo`.
Wrap example: if `p = 3` in a double week with nobody away, the row is `Liu+Okafor`.