remove-unity-worktree
/remove-unity-worktree
Remove a Unity git worktree created by new-unity-worktree, plus its branch, after checking for uncommitted work, unmerged commits and a running editor. Use when the user is done with a worktree, wants to clean up parallel branches, or says remove/delete/discard a worktree.
- Author
- notapro ↗
- Repository
- unity-worktrees ↗
- Licence
- MIT
- Last repository change
- 05.11.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: check-removable.sh, remove-worktree.sh
What it does and when to use it
Remove a Unity git worktree created by new-unity-worktree, plus its branch, after checking for uncommitted work, unmerged commits and a running editor. Use when the user is done with a worktree, wants to clean up parallel branches, or says remove/delete/discard a worktree.
Original author description
Remove a Unity git worktree created by new-unity-worktree, plus its branch, after checking for uncommitted work, unmerged commits and a running editor. Use when the user is done with a worktree, wants to clean up parallel branches, or says remove/delete/discard a worktree.
How it works
- Run
SKILL.md preview
--- name: remove-unity-worktree description: Remove a Unity git worktree created by new-unity-worktree, plus its branch, after checking for uncommitted work, unmerged commits and a running editor. Use when the user is done with a worktree, wants to clean up parallel branches, or says remove/delete/discard a worktree. --- # remove-unity-worktree ## Run From the main checkout (not from inside the worktree being removed): ``` ~/.claude/unity-worktrees/skills/remove-unity-worktree/remove-worktree.sh <name|branch|path> [--force] ``` If the session's cwd is inside the target (for example after `EnterWorktree`), call `ExitWorktree` with `action: "keep"` first, then run the script from the main checkout. The script refuses (exit 2) and prints why when: - an editor holds the worktree's `Temp/UnityLockfile` (closing it would lose unsaved scene edits), - there are uncommitted changes (files seeded by `new-unity-worktree` are ignored), - the branch has commits that exist on no other branch, - the target is the main checkout. On a refusal, show the user the reason and ask. Merge or commit first if they want the work kept. `--force` closes the editor via `unity command eval`, discards uncommitted changes and unmerged commits, and deletes the branch with `-D`. Use it only when the user has said to discard the work. Without `--force`, the branch is deleted with `-d`. Report the script's last line (`removed <path> and branch <name>`).
Files in this package (3)
- SKILL.md 1 KB
- check-removable.sh 1 KB
- remove-worktree.sh 3 KB
Versions
The database has no other skills named remove-unity-worktree.
Database snapshot: 13.11.2026 · package version cd2182161e65 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100remove-worktree
Use when user wants to safely remove an autonomy worktree while preserving the branch - 100new-unity-worktree
Create a git worktree of a Unity project that opens fast, for parallel agent work. Branches from HEAD, copies uncommitted Packages/ProjectSettings edits, and APFS-clones Library so the first open imports almost nothing. Use when the user wants a new worktree, a parallel branch,… - 100remove-worktree
Cleans up a git worktree after its branch has been merged. Runs git worktree remove, deletes the local branch and prunes remote refs. It stops without changing anything when the worktree has uncommitted changes, unpushed commits or a PR that is not merged. Use it when a feature… - 100worktree-close
Finish work in a SINGLE worktree: push, remove the worktree, optionally delete the branch. Use when done with a specific worktree, wrapping one up, pushing and moving on, or no longer needing a parallel environment. Triggers on "close this worktree", "I'm done with this… - 100worktree-cleanup
Actually remove finished git worktrees and their branches after they have been diagnosed: prove each one is merged (squash merges included) and clean, stop dev servers still running inside, remove the worktree and branch with plain git, prune dead registrations and empty shell… - 100residue
Remove the Git worktree this session created, once its task is done, with residue, which removes a worktree only when nothing in it would be lost. Use as the last step of a task that ran in a linked worktree, or when the user asks to clean up Git worktrees. Not for a worktree…