Zum Inhalt springen
Kitbay
Skill

cleanup-git-worktrees

NOASSERTIONAktualisiert am 11. Nov. 202684.974GitHub-SterneEnthält Skripte

A maintainer skill in the LobeHub repository for auditing and removing stale Git worktrees and local branches.

Was der Skill vermittelt

A maintainer skill in the LobeHub repository for auditing and removing stale Git worktrees and local branches. A bundled shell script fetches and prunes the remote, looks up each branch's pull request state with the GitHub CLI and classifies every worktree as deletable, needing manual review or protected, ignoring noise and scratch files. The agent shows one grouped table and deletes only after a single explicit approval, passing exact branch names; the script re-checks each target and refuses ones that are not candidates or are in use. It explains how to prove squash or rebase merges, never removes main, canary or the current worktree, and audits again afterwards.

Funktionen

  • Classify Git worktrees as deletable or protected
  • Check pull request state for each branch
  • Remove approved worktrees and branches
  • Prove squash-merged branches landed