Skip to content

08 / 08ShippingDev pack

prune-worktrees

Reclaim disk by pruning stale worktrees, fail-closed.

In the dev pack

Run the Catalyst installer to add or refresh both packs. See The skills packs for update and manual install options.

curl -fsSL https://staging.catalystcloud.dev/install.sh | sh

Then type /prune-worktrees in your coding agent, or describe the task and the agent picks the skill up.

Sourcecoalesce-labs/catalyst-dev-skills › prune-worktrees

Reclaims disk by scanning and pruning stale git worktrees in a Catalyst worktree farm. Use it when disk runs low or agents are blocked on writes (“disk full”, “no space left on device”, “free up space”), on a schedule, or to review protected worktrees.

It is fail-closed by design: it refuses to run unless the worktrees root is declared, and it removes only worktrees that are provably merged, closed or done, and clean or holding only agent residue. Open PRs and stale branches get a review instead of a deletion.

The installer’s daily housekeeping job runs this skill for you, which is why finished worktrees tidy themselves.

  • “No space left on device” during a build or an agent write.
  • A scheduled tidy, if you turned housekeeping off.

What was scanned, what was pruned, what was protected and why.