skills/smithery.ai/cleanup-dangling-worktrees

cleanup-dangling-worktrees

Installation
SKILL.md

Cleanup Dangling Worktrees

Overview

Git worktrees accumulate over time as features are developed and merged. This skill safely cleans up worktrees that are no longer needed because their associated feature PRs have been merged.

Core principle: Only remove a worktree if its feature PR is CONFIRMED merged. Never remove active development worktrees.

Safety Rules

A worktree is ONLY considered dangling if ALL of these are true:

  1. The worktree's branch has an associated PR
  2. That PR has been MERGED (not just closed)
  3. The worktree has no uncommitted changes
  4. The worktree has no unpushed commits

NEVER remove a worktree if:

Installs
1
First Seen
Apr 4, 2026
cleanup-dangling-worktrees from smithery.ai