cleanuplisted
Install: claude install-skill Misoto22/skills
# Cleanup
Remove what shipping left behind. Nothing else.
Read [shared/git.md](shared/git.md) first — in particular that a rebase or squash merge rewrites commits, so `git branch --merged` does not list a branch that landed. Every deletion here is verified against the forge, never against git alone.
**Default to `--dry-run` reasoning even without the flag: list everything, then delete.** With no scope flag, all four passes run. With any of `--branches`, `--remote`, `--worktrees`, `--residue`, only those. `--no-remote` drops the remote pass and keeps the rest — for a fork you cannot push to, or when you only want the local side tidied.
## 0. Inventory, before deleting anything
```bash
git fetch --prune
git branch -vv
git worktree list
git status --porcelain
git ls-remote --heads origin
```
`git fetch --prune` only deletes local `origin/*` tracking refs. It does not touch
a single branch on the remote, which is why the remote list is read separately —
a branch missing from `git branch -vv` may still be sitting on the forge.
Print one table. Nothing is removed until it is printed:
> **Cleanup `<repo>` → `<base>`**
>
> | Kind | Name | Finding | Action |
> |---|---|---|---|
> | branch | `<name>` | merged #12 · unmerged: N commits · no PR, contained in base | delete · keep: reason |
> | remote | `<name>` | merged #12 · open #22 · no PR | delete · keep: reason |
> | worktree | `<path>` | clean, branch merged · dirty: N files | remove · keep: reason |
> | residue | `<path>` |