Worktree Cleanup

•
68
•

Automates the safe removal of Git worktrees and their associated local branches to maintain a clean development environment.

The Worktree Cleanup skill streamlines post-development maintenance by identifying and safely removing stale Git worktrees and their corresponding local branches. It intelligently handles common Git friction points, such as ensuring the shell is positioned outside the target directory before deletion and warning users about uncommitted changes or unmerged branches. Whether used automatically after a PACT workflow consolidation or invoked manually to prune your workspace, this skill prevents environment clutter and minimizes manual Git overhead by providing clear options for resolving conflicts.

主な機能

01Automated detection and listing of active Git worktrees
02Intelligent shell navigation to prevent working directory errors during deletion
03Automatic deletion of associated local branches post-cleanup
0468 GitHub stars
05Safe worktree removal with protection against uncommitted changes
06Interactive error handling for unmerged code and stale metadata references

ユースケース

01Consolidating sub-scope branches into a main branch within the PACT framework
02Cleaning up transient development environments after a Pull Request has been merged
03Manual pruning of stale Git worktrees and branches to reduce repository clutter