Clean Worktrees — Development skill for Claude Code
Automatically clean all stale worktrees (pruned refs + merged branches).
How to install Clean Worktrees
Installs to ~/.claude/commands/florianbruniaux-cc-sessions-clean-worktrees.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/cc-sessions/HEAD/.claude/commands/clean-worktrees.md -o ~/.claude/commands/florianbruniaux-cc-sessions-clean-worktrees.md Restart Claude Code, or start a new session, for it to be picked up.
What Clean Worktrees does
Automatically clean all stale worktrees (pruned refs + merged branches).
Alternatives in Development
- Clean Worktree (Interactive) — Interactive cleanup of worktrees: lists merged/stale branches and asks confirmation before deleting 25.5k ★
- Worktree Cleanup — Remove worktrees and branches that have been merged: $ARGUMENTS 23.4k ★
- Repomix Unmixer — Unmix merged repository files 653 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Clean Worktree
Clean stale worktrees (pruned, merged, or orphaned branches)
Tidy Branches
Survey local branches and worktrees, delete the ones already merged upstream, and report a short state summary
Ctx Cleanup
Clean up completed worktrees and branches
Just Ship Status
/just-ship-status — Lokalen Repo-Zustand anzeigen (Branches, PRs, Board, Worktrees)
OSS Overnight
Overnight prepare-and-queue run: check PRs, prepare fix branches in worktrees, write a morning report. Never p
Spaceguard
macOS menu-bar app that watches free disk space and cleans stale dev caches, simulator runtimes and coding-age
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Branch Gardener
Triages local branches and stashes in a managed repo (merged, stale, superseded, unpushed) and proposes deleti