Use this skill when a user wants to plan a rotating bin-duty rota for a street or cul-de-sac: working out which household wheels the bins out each week, with double weeks (garden bins) needing two households, households away being skipped, and turn counts per household. Not for bin collection calendars or generic shift rotas without skip-and-carry-on rules.
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-06225ed2)
---
name: bin-rota-plan
description: "Use this skill when a user wants to plan a rotating bin-duty rota for a street or cul-de-sac: working out which household wheels the bins out each week, with double weeks (garden bins) needing two households, households away being skipped, and turn counts per household. Not for bin collection calendars or generic shift rotas without skip-and-carry-on rules."
---
# Bin rota plan
Produce a weekly rota from `input.json`, by hand-simulation (no code execution needed).
## Inputs
Read `input.json` in the working folder:
- `households`: array of unique names, in rota order (index 0..N-1).
- `startWith`: household whose turn comes up in the first week.
- `weeks`: array of `{week, double, away}` in week sequence. `away` is a list of names (may be empty or missing: treat as empty).
If a field is missing or `startWith` is not in `households`, use index 0 as the start, and note it in your reply. Never reorder `weeks`.
## Algorithm
Keep one pointer `p` (an index into `households`), initially the index of `startWith`.
For each week in `weeks` order, let `need` = 2 if `double` is true, else 1:
1. Repeat `need` times: starting at `p`, find the first household that is not in this week's `away`, checking indices `p, p+1, ...` with wrap `i mod N`. Assign it as a taker; set `p = (takerIndex + 1) mod N`.
2. Takers are recorded in the order found (so the end-of-list household precedes the start-of-list one after a wrap).
Rules:
- Households passed over get no make-up turn; `p` simply moves on from the last taker.
- The pointer carries across weeks and is never reset or based on week number.
- startWith is not special: if away in week 1, it is skipped.
- On a double week the two takers are distinct (after the first is taken, `p` moves past it). If N households can't fill it, input is invalid; take what's possible and say so.
- Away status applies only to that week; check each week's list afresh.
## Outputs (beside input.json)
1. `bin-rota.csv`: header line `week,households`, then one row per week in `weeks` order: `<week>,<taker>` or `<week>,<first>+<second>` (no spaces, rota order, never sorted). Names containing commas should be double-quoted. Use newline line endings, a trailing newline.
2. `bin-turns.json`: one JSON object, keys in the `households` order, values being integer turn counts (a double week counts 1 for each of the two takers); include zeros.
## Check before finishing
- Row count equals `weeks` length; the turns sum equals the total of `need` over all weeks.
- Re-walk a few weeks where someone was away to confirm the pointer moved from the last taker.
## Example
households Okafor, Brennan, Szabo, Liu; startWith Brennan.
- Week 10: Brennan (p→Szabo).
- Week 11, Szabo away: Liu takes it (p→Okafor).
- Week 12, double: Okafor+Brennan (p→Szabo).
- Week 13: Szabo.
Rows: `10,Brennan` / `11,Liu` / `12,Okafor+Brennan` / `13,Szabo`.