finishing-worklisted
Install: claude install-skill monte3l/m3l-automation
# finishing-work
`creating-prs` ends at Step 15, "Decide the merge path" — it owns the merge
itself, but nothing checks whether that merge actually happened, let alone
cleans up afterward. Nothing else in the repo owns the tail: returning to
`main`, deleting the merged branch, pruning stale remote-tracking refs,
flipping a tracker row, running `sync:hub`, or checking that a work log
exists. Left undone, that residue accumulates silently — a live audit of this
repo's own checkout after four clean merges found 4 stale remote-tracking
refs, 1 stale local branch, 1 stale worktree, and 1 orphaned spoke journal,
none of it caught by any gate at the time. This skill is that missing owner.
`pnpm check:staleness` (issue #995 / ROADMAP H2) now _detects_ this residue
class post-merge/post-rewrite and pre-push, but it only reports — cleaning up
what it finds, and the tracker/work-log/sync:hub steps below, are still this
skill's job.
`bin/worktree-remove.mjs` and `bin/worktree-prune.mjs` both exist already but
are worktree-scoped — neither helps when work happened in the shared
checkout, `starting-work`'s documented default. This skill calls whichever
of `bin/branch-cleanup.mjs` (shared checkout) or `pnpm worktree:remove`
(linked worktree) actually applies, rather than duplicating either.
## Steps
### 1 — Confirm the PR actually merged
Don't assume "the user said it merged" is enough — verify:
```bash
gh pr view --json state,mergedAt,headRefName,baseRefName
```
- `state: "MERGED"`