wk-worktree-cleanup
Installation
SKILL.md
Worktree Cleanup
Scan all git worktrees in the current repo → identify merged branches → clean merged ones → report unmerged ones for the user to decide.
Prerequisites
- Git aliases configured:
git wtl,git wtr ghCLI authenticated (for PR merge status on GitHub)- Default mode runs from the main worktree (repo root). To clean the worktree
you are currently inside, use
--currentmode (below) — it handles the chdir-to-main stepgit worktree removerequires.
Mode: clean the current worktree (--current)
- Removes the worktree the agent is currently inside — e.g., after
wk-pr-mergemerges this branch's PR. git worktree removecannot remove the current working directory → this mode chdir's to the main worktree first.