ss-cleanup

Installation
SKILL.md

Cleanup After Development

Wrap up finished work: confirm the PR/MR is merged (offer to merge it if it's still open), return to the main checkout on the up-to-date default branch, remove the development branch's worktree if it has one, and delete the spent branch locally and, optionally, on the remote.

Core principle: never delete a branch whose work isn't safely landed. A branch is only safe to delete once its PR/MR is merged, or the user explicitly confirms abandoning unmerged work. The same applies to a dirty worktree — uncommitted changes are only discarded after explicit confirmation.

Inputs

  • --merge: if the branch's PR/MR is open/draft, merge it without asking first.
  • --delete-remote: also delete the remote branch if it still exists after the merge.
  • --force: skip confirmation before discarding a dirty worktree or deleting an unmerged branch.

Step 0 — Fast exit: nothing to clean up

git fetch origin --prune
CURRENT=$(git branch --show-current)
BASE=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
Installs
4
GitHub Stars
1
First Seen
10 days ago
ss-cleanup — lbk-open/super-spec