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
  • gh CLI 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 --current mode (below) — it handles the chdir-to-main step git worktree remove requires.

Mode: clean the current worktree (--current)

  • Removes the worktree the agent is currently inside — e.g., after wk-pr-merge merges this branch's PR.
  • git worktree remove cannot remove the current working directory → this mode chdir's to the main worktree first.
Installs
4
First Seen
Aug 19, 2026
wk-worktree-cleanup — whizzzkid/skills