---
name: cleanup-crew
license: MIT
description: Runs the whole tidy-up in one fixed order by conducting six single skills - strays, attic, tidy-sessions, tidy-worktrees (a second time after the questions), cold-case, case-closed, attic (a second time after the seals). Reads everything first, then asks its questions bundled. Use with /cleanup-crew, or when the user asks to clean up everything at once. Modes "show only" (changes nothing) and away mode. Not a replacement for the single skills and not for one clean-up alone.
compatibility: Claude desktop app (Code tab) for the session steps, git for the repository steps. Needs the six single skills installed.
metadata:
  author: "Jakob Christensen"
  source: "https://jakobchristensen.com"
---

# Cleanup crew

Conductor, not a copy: every rule lives in the single skill's own SKILL.md. For each step below, read that file's named part (not the whole skill, never load all six in one go) and follow it, except where this file says otherwise. A single skill missing: skip its step and say so in one line of the report.

Skill folders: where your agent keeps its skills, `<skills folder>/<name>/SKILL.md`. Keep a state file (`cleanup-crew-state-<date>.md` in a scratch folder outside the repositories) and append each step's result, so a handover mid-run starts from the file.

## Modes

- **Show only**: the single skills' dry runs. Nothing is pushed, archived, removed, deleted or sent. Every "would ..." lands in the report. Use it for a first run.
- **Away**: no push, no deletion, no question box. Gathered questions wait for the final report.

## Step 0: cost and model

Before reading, name the model, the number of sessions (`list_sessions`) and the readers. On the most expensive model, ask for a mid-priced one first (cold-case's cost rule). More than 15 sessions to read: at most two cheap-model readers. More agents only after the user agrees. Read each session once: steps 3 and 8 share one read.

## Step 1: strays

Read `strays` parts 1 and 2. Repos: every folder you name (your projects folder and the drives you work on) that holds a `.git` folder. A `.git` file marks a worktree, skip it. Keep an exclusion list for stale clones. Ask the push question now, once for all repos, with commit counts: the later steps compare against the remote default branch, and unpushed landed work looks unlanded to them. Part 3 of `strays` (the pushes) runs only on a yes. Without a push, the report marks such worktrees "landed locally, not pushed". A push updates the local remote ref, so run the later steps after it.

## Step 2: attic

Read `attic` in full (it is short). It reads no events and shortens the reading list for step 3.

## Step 3: tidy-sessions

Read `tidy-sessions` steps 0 to 4a and its "Waiting report". Archive without asking (the request is the permission). The 4b box waits for step 7. Write rescued soft points to the scratch folder, not the system temp folder. Write the settled, kept and waiting lists to the state file. The waiting sessions are the input of step 8.

## Step 4: tidy-worktrees

Read `tidy-worktrees` steps 1 to 5, once per repo from step 1, and only for worktrees whose session is archived or that have none. A dev server that blocks a worktree: stop it only when its branch has landed, otherwise report it.

## Step 5: app storage (optional, own approval)

If the app offers a worktree clean-up tool (30/60/90 days inactive, sessions and branches stay), use it only with its own approval card, never with uncommitted changes or session deletion included. Kept worktrees of archived sessions with uncommitted changes are reported only, never discarded without the user's explicit word.

## Step 6: one box

One box (max 4 questions), each option with pro, con and recommendation: `git worktree prune` for prunable entries, the 4b sessions of `tidy-sessions`, optional step 5. A yes runs the matching command from the single skill. In away or show-only mode: no box, everything goes to the report.

## Step 7: tidy-worktrees again

Only if the 4b answers archived sessions: run step 4 once more, for the worktrees of exactly those sessions. Otherwise skip it with one line in the report.

## Step 8: cold-case

Read `cold-case` Cost, steps 2 to 7 and Rules, working from the waiting sessions of step 3 (start cards need its `limit: 40` read-back). Boxes and delivery warning as there. Its "R" rule applies. Away mode: skip, list the questions.

## Step 9: case-closed

Seal the unticked leaves of ticked chains (`case-closed` "Sealing another session"): the sessions that step 2 reported as kept because a descendant is not ticked. Read their events once, apply the handed-over rule (dated points in the project's open list) and the series rule (a part whose follow-up runs or is finished), and seal only those that hold. In away or show-only mode, list them as "would seal" and change nothing. Write the sealed sessions to the state file: they are the input of step 10.

This session itself is sealed last, with the final report after step 10, and only when its conditions hold (`case-closed` "When to seal"): nothing waiting, nothing running, git clean. An open question or a pending push means no seal.

## Step 10: attic again

Run `attic` once more, so the parents freed by step 9 and the sealed leaves are archived in this run. One exception to its step 2: a session this run sealed in step 9 is a candidate without the 20-minute wait, because step 9 has just checked that nothing runs or waits there. A running session still stays. Every other session keeps the 20-minute rule, and so does `/attic` on its own. In show-only mode, list "would archive" and change nothing. If step 9 sealed nothing and step 2 kept no parent, skip it with one line in the report.

## Report

One short block per step: counts taken from this run's results, what was kept and why, "not checked" where it applies, every "Needs your attention" line from the single skills. State the mode on top. A step that was skipped or failed says so in one line.
