Skip to main content
ClaudeWave
Skill1.4k repo starsupdated yesterday

clean-worktrees

Clean git worktrees created by git-worktree-runner

Install in Claude Code
Copy
git clone --depth 1 https://github.com/dyoshikawa/rulesync /tmp/clean-worktrees && cp -r /tmp/clean-worktrees/.rulesync/skills/clean-worktrees ~/.claude/skills/clean-worktrees
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

1. Run `git gtr list` to list all worktrees.
2. For each worktree branch that is NOT the default branch (e.g. main), run `git gtr rm --force {branch}` to remove it.
3. Run `git pull --prune` to fetch latest changes and prune deleted remote branches.