FlorianBruniaux

Clean Worktrees — Development skill for Claude Code

Development community

Automatically clean all stale worktrees (pruned refs + merged branches).

How to install Clean Worktrees

Installs to ~/.claude/commands/florianbruniaux-cc-sessions-clean-worktrees.md

Terminal
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 Repository