本文へスキップ
Kitbay
スキル

clean-old-worktrees-global

Apache-2.02026年11月11日 更新50,877GitHubスタースクリプトあり

A skill in the ClickHouse repository for freeing disk space by deleting unused git worktrees and old build folders across every checkout under the home folder or another root, including worktrees nested inside checkouts.

スキルの内容

A skill in the ClickHouse repository for freeing disk space by deleting unused git worktrees and old build folders across every checkout under the home folder or another root, including worktrees nested inside checkouts. Anything untouched since a set age, one day by default, counts as unused. A bundled scan script lists candidates; the agent then reviews them, keeping main repositories, anything of unknown age, and worktrees with uncommitted work or commits that would be lost unless the user confirms. A bundled delete script removes the final list, skipping folders in use by a process or holding mount points, and can be rerun if it times out. The report covers what was deleted, kept and skipped, with disk usage before and after.

できること

  • Scan checkouts for stale worktrees and build folders
  • Keep worktrees with unsaved or unpushed work
  • Delete the reviewed list with safety checks
  • Report disk usage before and after