goulvenclech

Tidy Branches — Development skill for Claude Code

Development community

Survey local branches and worktrees, delete the ones already merged upstream, and report a short state summary.

How to install Tidy Branches

Installs to ~/.claude/skills/goulvenclech-dotclaude-tidy-branches/SKILL.md

Terminal
mkdir -p ~/.claude/skills/goulvenclech-dotclaude-tidy-branches && curl -fsSL https://raw.githubusercontent.com/goulvenclech/dotclaude/HEAD/commands/tidy-branches.md -o ~/.claude/skills/goulvenclech-dotclaude-tidy-branches/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Tidy Branches does


description: Survey local branches and worktrees, delete the ones already merged upstream, and report a short state summary.

Procedure

1. Survey

Refresh remote-tracking state and prune deleted upstreams first — otherwise "merged" reads stale. Then take stock of every local branch (its upstream and tracking status) and every worktree (its branch, and whether it's clean).

2. Decide what's merged

A branch is safe to drop once its work has landed upstream. Cross-check signals

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 ★
  • Survey — PUA 调研问卷 — 7 部分交互式问卷收集用户反馈 19.5k ★

Full documentation available on GitHub

View Source Repository