# Clean Worktrees

Clean git worktrees created by git-worktree-runner

- Repository: https://github.com/dyoshikawa/rulesync (1577 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dyoshikawa/rulesync --skill clean-worktrees -g -a claude-code -y`
Codex: `npx skills add dyoshikawa/rulesync --skill clean-worktrees -g -a codex -y`
Cursor: `npx skills add dyoshikawa/rulesync --skill clean-worktrees -g -a cursor -y`
Gemini CLI: `npx skills add dyoshikawa/rulesync --skill clean-worktrees -g -a gemini-cli -y`

## Description

Clean git worktrees created by git-worktree-runner

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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.

