Skip to content
Back to skills

Bin Rota Plan

ASecurity

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.

  • 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-ddf6e53e/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-bin-rota-plan-ddf6e53e)

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: "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.

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.