worktree-clean

Installation
SKILL.md

worktree_path = $ARGUMENTS

Remove a local worktree and delete its associated local branch. If no argument is provided, list worktrees and ask which to remove.

Local Only

Remote branches carry invisible state — open MRs, CI pipelines, review comments, deployment triggers — and deleting one can auto-close an MR silently. The user owns remote-branch deletions.

When Removal Resists

git worktree remove fails on unclean state; git branch -d fails on unmerged branches. Trivial leftovers (build artifacts, debug logs, already-pushed-or-merged work) justify forcing autonomously. Substantive uncommitted or unmerged work — describe what you found and let the user decide.

Run git worktree prune after removal to clear stale internal references.

Installs
2
GitHub Stars
9
First Seen
Mar 12, 2026
worktree-clean — jhostalek/dotclaude