The rota, without the WhatsApp chaos: 10 AI skills for shifts
shift-swap
check a swap against the same limits before a manager says yes
How the two work together
Claude thinks it through. Paste the Claude prompt into Claude Code, or drop the folder into your skills folder. Claude does the judgement: what to look for, what is worth doing, what is right.
Codex gets it done. At the hand-off point Claude runs Codex on your machine with one command and passes it the Codex prompt. Codex does the mechanical part and hands the result back. Claude checks it before you see it.
No API key to set up: Claude calls the Codex you already have installed. If Codex is not installed, Claude does that half itself and tells you.
Prompt for Claude
--- name: shift-swap description: Checks a staff-arranged shift swap against the same rest and hours limits the original rota was built to, before a manager approves it, because a swap that looks fair between two colleagues can still push one of them under the 11-hour daily rest period, over the 48-hour average, or into a pattern their written statement no longer describes. It also works out when a swap has happened often enough that it is no longer a one-off and needs a written statement of change within the legal time limit. Use whenever a worker asks to swap a shift, cover a colleague, or trade a weekend, and before a manager says yes. --- # A shift swap that gets checked the same way the rota was You give this the original rota, the swap being requested, and who is doing which shift instead. You get back the daily and weekly rest check for both workers after the swap, their running 48-hour average after the swap, and a flag if the pattern has repeated enough times to need a written statement of change. ## What it does 1. **Treat the swap as a new rota, not an exception to the old one.** The Working Time Regulations 1998 set the same limits whoever is on the shift: regulation 10(1) still entitles each worker to "a rest period of not less than eleven consecutive hours in each 24-hour period during which he works for his employer", and regulation 4(1) still caps working time at "an average of 48 hours for each seven days" over the applicable reference period. A swap approved on the basis that "it's their own choice" does not change either figure. Recalculate both workers' gaps and averages with the swap in place, not with the original rota. 2. **Check the worker picking up the extra shift first.** The commonest way a swap breaks the rules is the person covering a colleague's weekend also working their own full week either side of it, so their closing shift on Friday and the colleague's opening shift on Saturday sit closer together than 11 hours apart, or their total for the week pushes their running average over 48. Run the daily rest and weekly average check on the covering worker exactly as built in rota-builder, using the swapped shifts in place of the originals. 3. **Check the weekly rest pattern still holds for both workers.** Regulation 11(1) entitles each worker to "an uninterrupted rest period of not less than 24 hours in each seven-day period", or the 14-day alternative the business has chosen under regulation 11(2). A swap that moves someone's day off to cover a colleague can leave them with no qualifying rest period in that window at all, even though each individual shift is fine. 4. **Count how many times this pair has swapped this pattern.** A single one-off swap is not a change to anyone's contract. A pattern that repeats, such as the same two workers permanently trading Tuesday for Saturday every week, is a different working pattern in substance, and section 4(1) of the Employment Rights Act 1996 requires the employer to give a written statement of the change "at the earliest opportunity and, in any event, not later than one month after the change in question." Flag a repeat pattern rather than letting it run as an informal swap indefinitely with no written record. 5. **Record who approved it and when.** A swap with no record of manager sign-off is the thing that gets disputed six weeks later when nobody remembers whether it was agreed, covered, or just happened. Log the date, both workers' names, the shifts exchanged, and the name of the person who approved it. ## Then it checks 1. Both workers' daily rest gaps are recalculated with the swap in place and shown, not assumed from the original rota. 2. Both workers' running 48-hour average is recalculated with the swap in place. 3. Both workers still have a qualifying weekly rest period in the affected week under the pattern the business uses. 4. The number of times this exact pair has swapped this exact pattern in the last 12 weeks is counted and shown. 5. The swap has a recorded approver, a recorded date, and the shifts named on both sides. Any check fails: name it, redo that step once. Failed twice: say what is wrong and stop. ## Rules - Public information only. - Never invent a fact, a number or a quote. - Anything sent in someone's name says whose name it is. - Never approve a swap on the strength of "they're both happy with it"; the rest and hours limits apply regardless of consent between the two workers. - A repeat pattern flagged four or more times in 12 weeks is reported as needing a written statement of change; it is never silently absorbed into the next rota without one. - Young workers are not covered by this skill; use young-worker-rota, because their rest figures are different under the same Regulations. - This output is a working document prepared for the owner to check against their own rota and written particulars, and for their adviser to check where a repeated pattern may need a formal contract change. It applies the Working Time Regulations 1998 and the Employment Rights Act 1996 to a draft swap; it is not legal advice and it is not confirmation that the approved swap complies. ## Built from - The Working Time Regulations 1998, regulation 10, https://www.legislation.gov.uk/uksi/1998/1833/regulation/10, SI 1998/1833, read 3 November 2026: the 11-hour daily rest entitlement recalculated for the swapped shifts, behind steps 1 and 2. - The Working Time Regulations 1998, regulation 4, https://www.legislation.gov.uk/uksi/1998/1833/regulation/4, SI 1998/1833, read 3 November 2026: the 48-hour average limit recalculated for the swapped shifts, behind steps 1 and 2. - The Working Time Regulations 1998, regulation 11, https://www.legislation.gov.uk/uksi/1998/1833/regulation/11, SI 1998/1833, read 3 November 2026: the weekly rest entitlement, behind step 3. - Employment Rights Act 1996, section 4, https://www.legislation.gov.uk/ukpga/1996/18/section/4, Act of Parliament, read 3 November 2026: the one-month time limit for a written statement of a change to particulars, behind step 4.
Prompt for Codex
# shift-swap ## You are given The original published rota for the affected week(s). The swap request: both workers' names, the shifts being exchanged (date, start time, end time, role), and who requested it. A log of prior swaps between any two workers over the last 12 weeks, if one exists. Each affected worker's current running total against the 48-hour average from the rota-builder output, if available. The weekly rest pattern the business uses: `24-hour weekly` or `48-hour fortnightly` or `two-24-hour-fortnightly`. The name of the manager approving the swap and the date of approval. ## Produce Write into a `./shift-swap-output/` folder: 1. `swap-request.csv` with columns: `swap_ref`, `request_date`, `worker_a_name`, `worker_a_shift_given_up`, `worker_a_shift_taken_on`, `worker_b_name`, `worker_b_shift_given_up`, `worker_b_shift_taken_on`, `approver_name`, `approval_date`. `swap_ref` is SW0001 upward. 2. `post-swap-rota.csv` with the same columns as `rota-grid.csv` from rota-builder, reflecting the rota with the swap applied. 3. `daily-rest-recheck.csv` with columns: `worker_name`, `date`, `previous_shift_end`, `next_shift_start`, `gap_hours`, `verdict`, `changed_by_swap`. `changed_by_swap` is `yes` or `no`. `verdict` is `pass` or `below 11 hours`. 4. `weekly-average-recheck.csv` with columns: `worker_name`, `reference_period`, `total_hours_after_swap`, `average_hours_per_week_after_swap`, `verdict`. `verdict` is `pass` or `average exceeds 48 hours`. 5. `weekly-rest-recheck.csv` with columns: `worker_name`, `period_start`, `period_end`, `pattern_applied`, `rest_periods_found`, `verdict`. `verdict` is `pass` or `rest period not met`. 6. `repeat-pattern-log.csv` with columns: `worker_a_name`, `worker_b_name`, `pattern_description`, `occurrences_last_12_weeks`, `flagged_for_written_statement`. `flagged_for_written_statement` is `yes` if `occurrences_last_12_weeks` is 4 or more, otherwise `no`. 7. `gaps.md` - a numbered list of: every `below 11 hours` row; every `average exceeds 48 hours` row; every `rest period not met` row; every `flagged_for_written_statement` row with `yes`; any swap request with no recorded approver; and any swap where one worker's post-swap shift data could not be calculated. ## Rules - Codex counts, matches and recalculates. It never approves or refuses a swap, and it never invents a rest pattern, reference period, or prior swap history not supplied. - Recalculate every daily-rest and weekly-average figure from the post-swap rota; never carry forward a pre-swap figure unchanged. - `occurrences_last_12_weeks` counts only swaps logged in the supplied history plus this one; it is never estimated. - Never suggest an alternative swap, never recommend a third worker to cover instead, and never decide whether a repeat pattern should become a permanent change. Report the count; the owner decides. - Use British English and DD Month YYYY dates. No em dashes in any file you write. - Every file ends with this line: this is a working document prepared for the owner to check against their own rota and written particulars, and for their adviser to check where a repeated pattern may need a formal contract change. It applies the Working Time Regulations 1998 and the Employment Rights Act 1996 to a draft swap and is not confirmation that the approved swap complies. ## Return The absolute path of each file written and the row count of each CSV. Both workers' daily-rest gaps before and after the swap. Both workers' average hours after the swap. The weekly-rest verdict for both workers. The `occurrences_last_12_weeks` count for this pair and whether it is flagged. Whether an approver and date were recorded. The `gaps.md` item count.
Built from the best public work on this
Sources for shift-swap
Everything below was opened and read on 3 November 2026. Nothing is cited that could not be loaded.
1. The Working Time Regulations 1998, regulation 10
https://www.legislation.gov.uk/uksi/1998/1833/regulation/10, SI 1998/1833, read 3 November 2026.
Regulation 10(1): "A worker is entitled to a rest period of not less than eleven consecutive hours in each 24-hour period during which he works for his employer." Nothing in the regulation makes this conditional on how the shift came to be worked, so a shift taken on through a swap carries the same entitlement as one placed by the original rota.
This is why step 1 and step 2 insist on recalculating, not adjusting, the daily rest figure once a swap is applied. A swap agreed between two happy colleagues is still a change to the actual hours worked, and the regulation looks at hours worked, not at who asked for them.
Where the skill departs: regulation 21 and regulation 24 cover exceptions and compensatory rest for work that needs continuity. The skill flags a short gap after a swap; it does not decide whether an exception applies to the swapped shift.
2. The Working Time Regulations 1998, regulation 4
https://www.legislation.gov.uk/uksi/1998/1833/regulation/4, SI 1998/1833, read 3 November 2026.
Regulation 4(1) caps "working time, including overtime, in any reference period which is applicable in his case" at "an average of 48 hours for each seven days", with the default reference period set at "any period of 17 weeks in the course of his employment" by regulation 4(3)(b). A swap that adds an extra shift to someone already near the top of their rolling average can tip it over, even where the swap itself looks like a small favour between two colleagues.
Where the skill departs: regulation 5's individual opt-out is recorded if supplied, never drafted or recommended by this skill.
3. The Working Time Regulations 1998, regulation 11
https://www.legislation.gov.uk/uksi/1998/1833/regulation/11, SI 1998/1833, read 3 November 2026.
Regulation 11(1) entitles a worker to "an uninterrupted rest period of not less than 24 hours in each seven-day period during which he works for his employer", with regulation 11(2) allowing an employer-chosen alternative of "two uninterrupted rest periods each of not less than 24 hours in each 14-day period" or "one uninterrupted rest period of not less than 48 hours in each such 14-day period." A swap that moves someone's rest day to cover a colleague's shift can leave that worker with no qualifying rest period anywhere in the window, which step 3 exists to catch.
Where the skill departs: the young worker figure at regulation 11(3), 48 hours in each 7-day period, sits outside this skill; swaps involving a worker under 18 should be checked with young-worker-rota instead.
4. Employment Rights Act 1996, section 4
https://www.legislation.gov.uk/ukpga/1996/18/section/4, Act of Parliament, read 3 November 2026.
Section 4(1): "If, after the material date, there is a change in any of the matters particulars of which are required by sections 1 to 3" "the employer shall give to the worker a written statement containing particulars of the change." Section 4(3)(a) sets the deadline: the statement must be given "at the earliest opportunity and, in any event, not later than one month after the change in question."
A single swap is not, on its own, a change to a worker's particulars; it is a one-off trade of two shifts, both already within their existing pattern. But two workers who repeatedly trade the same days every week have, in substance, changed their working pattern, and section 4 does not care whether the change was labelled a swap. Step 4 counts repeats rather than labels, because the label "swap" is exactly how a real change to a pattern avoids ever being written down.
Where the skill departs: section 4(4) to (8) cover related matters, including changes arising from a worker going to work outside the UK, which do not apply to a hospitality shift swap and are not used here.
Best public prompt we found for this job
The closest public artefact is the `draft-outreach` skill in Anthropic's `knowledge-work-plugins` repository, raw source at https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/sales/skills/draft-outreach/SKILL.md. The repository has 34,654 stars, read from api.github.com on 3 November 2026. It is a sales message skill, not a rota tool, but the comparison is useful because both jobs track a repeated interaction between two named parties and decide when a pattern has become significant enough to act on, rather than treating every instance as a fresh event.
The useful part is its discipline about not treating every touch the same:
escalating directness across a three touch sequence
We took the underlying idea, that repetition changes what an interaction means and the system should track the count rather than react to the latest instance alone, and applied it to counting swaps between the same pair rather than counting sales touches.
We did not copy its escalation logic itself. A sales sequence is designed to get more direct as it repeats, because that serves the sender. A shift-swap count is designed to trigger a statutory paperwork duty, not to prompt firmer action, and the correct response to four repeats is a written statement of change, not a stronger message. We also did not copy its single-party framing: a swap always has two workers whose rest and hours both need checking, where an outreach sequence tracks only the one recipient.
Want this running in your business?
I optimise how businesses run — your sales, your visibility, your social media — and build bespoke software where nothing off the shelf fits. The first conversation is free. Work starts from £150 a day.
Foxera