Skip to content
Back to skills

Bin Rota Plan

ASecurity

Plan a rotating bin-duty rota from input.json (households, startWith, weeks with double/away) and write bin-rota.csv and bin-turns.json. Use whenever the user asks for a bin rota, wheelie-bin turns, cul-de-sac bin duty, or a rotating weekly turn plan where away households are skipped without make-up turns and double weeks need two households.

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

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

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 rotating bin-duty rota from input.json (households, startWith, weeks with double/away) and write bin-rota.csv and bin-turns.json. Use whenever the user asks for a bin rota, wheelie-bin turns, cul-de-sac bin duty, or a rotating weekly turn plan where away households are skipped without make-up turns and double weeks need two households.
---

# Bin rota plan

You cannot run code, so you carry out the rota by hand, step by step, and write the two output files with the file-writing tool. The rule is simple but easy to get subtly wrong, so work from a written trace.

## Inputs
Read `input.json` in the working folder:
- `households`: names in rota order. Number them 0..n-1 by position.
- `startWith`: the household whose turn is up first. Find its index; that is the starting **pointer**.
- `weeks`: array of `{week, double, away}`, already in order. Process in the given order; do not re-sort.

## Algorithm
Keep one **pointer** (an index into `households`). For each week in order:

1. Need `k = 2` if `double` is true, otherwise `k = 1`.
2. Starting at the pointer, walk forward through the list, wrapping from the last household to index 0. For each household you reach:
   - If its name is in this week's `away`, it is passed over: skip it, nothing is owed to it later.
   - Otherwise it takes a turn: record it, count +1 for it.
   - Stop once `k` households have been recorded. Never take the same household twice in one week (the input guarantees enough are home, so you never need to go round more than once).
3. Set the pointer to the index just **after the last household recorded** (wrapping n-1 -> 0). Passed-over households that sit before it are not revisited; they wait until the pointer comes round to them again.
4. Record the week's households in the order they were reached (this is walk order, which can put a late-list name before an early-list name after a wrap). Never sort by name or by list position.

The starting week is not special: `startWith` is just where the pointer begins, and if it is away in week 1 it is passed over like anyone else.

Worked example: households [Okafor, Brennan, Szabo, Liu], start Brennan (pointer 1). Week 10: Brennan, pointer 2. Week 11, Szabo away: skip Szabo, Liu, pointer 0. Week 12 double: Okafor+Brennan, pointer 2. Week 13: Szabo.

## Working method
Before writing files, write out a trace, one line per week: `week | away | pointer in | households taken | pointer out`. Check each line against the previous line's pointer out. Keep running turn counts per household. Do this for every week; don't skip ahead by assuming a pattern, since away lists change the order. Match away names exactly (case and spelling) to the household names.

## Output 1: `bin-rota.csv` (beside input.json)
- First line: `week,households`
- One line per week, same order as `weeks`: the week value exactly as in the input, a comma, then the household name, or for double weeks `First+Second` with no spaces around the `+`.
- No blank lines or extra columns; end with a trailing newline. (If a name ever contains a comma or quote, wrap that field in double quotes.)

## Output 2: `bin-turns.json` (beside input.json)
A JSON object with exactly one key per household, in `households` order, each value the integer count of turns in the plan, including `0` for households that never took a turn. Example:
```json
{
  "Okafor": 2,
  "Brennan": 2,
  "Szabo": 1,
  "Liu": 1
}
```

## Final checks
- CSV has (number of weeks + 1) lines; double weeks contain exactly one `+`.
- Sum of all counts = number of single weeks + 2 x number of double weeks.
- No household appears in a week it was away.
- JSON keys are all households, in original order.
Then tell the user the files were written, in one or two sentences.

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 tools →

Comments

Loading comments…

Newsletter

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