Skip to content
Back to skills

Bin Rota Plan

ASecurity

Plan a weekly bin-duty rota for a street or shared household group from an input.json (households in rota order, startWith, weeks with double and away). Produces bin-rota.csv and bin-turns.json. Use whenever the user mentions a bin rota, wheelie bin turns, a rotating weekly duty with skipped away households, or double (garden bin) weeks, even if they don't name the files. Works by hand, with no scripts needed.

  • 24 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
developmentgo

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill bin-rota-plan --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bin Rota Plan?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bin Rota Plan
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-bin-rota-plan-3907c7d0/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-bin-rota-plan-3907c7d0)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bin-rota-plan
description: Plan a weekly bin-duty rota for a street or shared household group from an input.json (households in rota order, startWith, weeks with double and away). Produces bin-rota.csv and bin-turns.json. Use whenever the user mentions a bin rota, wheelie bin turns, a rotating weekly duty with skipped away households, or double (garden bin) weeks, even if they don't name the files. Works by hand, with no scripts needed.
---

# Bin rota plan

Read `input.json` in the working folder, then write `bin-rota.csv` and `bin-turns.json` beside it. You can't run code, so you simulate the rota by hand. The rota is a circular list with a moving pointer, so the work is careful bookkeeping. Do it step by step and write out your trace.

## Input shape

- `households`: names in rota order (unique). Index them 0..n-1.
- `startWith`: the household whose turn comes up first.
- `weeks`: array of `{week, double, away}` in order. `away` is a list of names that are away that week.

## Algorithm

Keep one variable, **pointer**: the index of the next household to be considered. Initially it is the index of `startWith` in `households`.

For each week, in the order given:

1. Set `need` = 2 if `double` is true, else 1.
2. Look at the household at `pointer`. If its name is in this week's `away` list, skip it (it gets no make-up turn). Otherwise it takes a turn and is added to this week's list. Then move to the next index, wrapping from n-1 to 0.
3. Repeat step 2 until `need` households have been chosen. Chosen households are recorded in the order reached. Don't choose the same household twice in one week (you won't, since you stop after fewer than one lap and enough are home).
4. Set `pointer` to the index just after the **last household chosen** this week. Passed-over households that were skipped before it are not revisited, because the pointer has already moved beyond them. This is what "no make-up turn" means.
5. Add 1 to the turn count of each chosen household.

Notes on subtle points:
- `startWith` gets no special treatment. If it is away in week 1, skip it and carry on to the next household at home.
- Skipping happens only while looking for the next taker. A household skipped at the very end of a week's search (after the last chosen one) is not skipped, it's simply not reached yet: since the pointer is set right after the last chosen household, that household is considered next week, and it takes the turn then if it is home.
- In a double week, the second household is the next at-home household after the first, not the next in the list. Example: list A,B,C,D, pointer at A, B away, double → A+C, pointer to D.
- Wrap-around order is kept: pointer at D in a four-list, double, nobody away → `D+A`, never alphabetical, never list order.
- Match away names exactly as written.

## Worked example

Households Okafor, Brennan, Szabo, Liu; startWith Brennan (pointer 1).
- Week 10: Brennan. Pointer 2.
- Week 11: Szabo away, skip; Liu. Pointer 0.
- Week 12 double: Okafor, Brennan → `Okafor+Brennan`. Pointer 2.
- Week 13: Szabo (back at home, its turn came round). Pointer 3.

## Method for working by hand

Before writing files, write a trace table in your reasoning, one line per week: `week | pointer before | away | chosen | pointer after`. Check each line against the rules. For long inputs, take the weeks in blocks and re-verify that each block's starting pointer equals the previous block's ending pointer. A single slip carries through the rest of the plan, so don't skip this.

## Output files

**bin-rota.csv**: first line exactly `week,households`. Then one row per entry in `weeks`, in the same order, `week` copied as given, then a comma, then the household name, or for a double week the two names joined with `+` and no spaces, in the order reached (e.g. `12,Okafor+Brennan`). Don't sort or add extra columns or blank lines. If a name contains a comma or a quote, wrap that field in double quotes (doubling any inner quotes); otherwise don't quote.

**bin-turns.json**: a JSON object with one key per household, in the same order as `households`, value = number of turns taken in the whole plan (a double week counts as one turn for each of the two). Include households with 0. Example:

```json
{
  "Okafor": 1,
  "Brennan": 2,
  "Szabo": 1,
  "Liu": 1
}
```

## Final check

- Row count equals the number of weeks; the weeks' order matches the input.
- Sum of the counts equals the total number of turns: weeks + number of double weeks.
- Nobody listed in a week's `away` appears in that week's row.
- Keys in bin-turns.json match `households` exactly, in order.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.