Clean Worktree — Development skill for Claude Code
Clean stale worktrees (pruned, merged, or orphaned branches).
How to install Clean Worktree
Installs to ~/.claude/commands/florianbruniaux-cc-sessions-clean-worktree.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/cc-sessions/HEAD/.claude/commands/clean-worktree.md -o ~/.claude/commands/florianbruniaux-cc-sessions-clean-worktree.md Restart Claude Code, or start a new session, for it to be picked up.
What Clean Worktree does
Clean stale worktrees (pruned, merged, or orphaned 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 Worktrees
Automatically clean all stale worktrees (pruned refs + merged 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
Dead Crusade
Unleash parallel Dead Code Purist agents to find and eliminate unused exports, orphaned files, commented-out b
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
Related Agents
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Branch Gardener
Triages local branches and stashes in a managed repo (merged, stale, superseded, unpushed) and proposes deleti