← ClaudeAtlas

pm-cleanlisted

Scan two independent fronts and recommend cleanup — open GitHub issues (solved-by-PR, inactive, superseded, duplicates) and the on-disk workspace (stale worktrees + local/remote branches, via the shared stale-cleanup.sh). Never auto-closes issues or deletes worktrees/branches without confirmation. Triggers on "pm-clean", "stale issues", "clean backlog", "close stale", "clean worktrees", "stale branches", "prune branches".
auerbachb/claude-code-config · ★ 5 · Code & Development · score 73
Install: claude install-skill auerbachb/claude-code-config
`/pm-clean` is the repo's single janitor. It runs two **independent** staleness scans and presents one recommend-then-confirm report: 1. **Open GitHub issues** — solved-by-merged-PR, inactive, superseded, potential duplicates. 2. **On-disk workspace** — stale worktrees and stale local/remote branches, via `stale-cleanup.sh` (the exact script `/pm-update` Step 8 calls — one implementation, no divergence). The two scans never gate each other: one finding nothing does **not** suppress the other, and the summary always reports both. Nothing is closed or deleted without explicit confirmation. Resolve both scan engines before Step 0: ```bash resolve_script() { local name="$1" candidate for candidate in \ "$HOME/.claude/skills-worktree/.claude/scripts/$name" \ "$HOME/.claude/scripts/$name" \ ".claude/scripts/$name"; do if [[ -x "$candidate" ]]; then echo "$candidate"; return 0; fi done return 1 } BACKLOG_STALENESS_SH=$(resolve_script backlog-staleness.sh || true) STALE_CLEANUP_SH=$(resolve_script stale-cleanup.sh || true) [[ -n "$BACKLOG_STALENESS_SH" ]] || { echo "ERROR: backlog-staleness.sh not found (checked all three paths) — issue scan unavailable" >&2; exit 1; } [[ -n "$STALE_CLEANUP_SH" ]] || { echo "ERROR: stale-cleanup.sh not found (checked all three paths) — workspace scan unavailable" >&2; exit 1; } ``` > **Invoking-repo scope (issue #687).** Both scans stay in the invoking repo's lane: > the issue scan (`backlog-staleness.sh`) runs `gh issue