From spec-first
Deletes local Git branches whose remote tracking branches are gone, including associated worktrees, after user confirmation. Activates on 'clean up branches', 'delete gone branches', 'prune local branches', or similar.
npx claudepluginhub sunrain520/spec-firstThis skill uses the workspace's default tool permissions.
Delete local branches whose remote tracking branch has been deleted, including any associated worktrees.
Deletes local Git branches with gone remote tracking after confirmation, including worktrees. Run discovery script, list branches, confirm y/n, then prune.
Safely identifies and deletes merged and stale Git branches after fetching latest state, filtering by pattern, and user confirmation via interactive prompts. Protects main branches.
Safely analyzes and cleans up local git branches/worktrees: categorizes merged/squash-merged/superseded/active, groups related ones, deletes only after user approval.
Share bugs, ideas, or general feedback.
Delete local branches whose remote tracking branch has been deleted, including any associated worktrees.
Run the discovery script to fetch the latest remote state and identify gone branches:
bash scripts/clean-gone
The script runs git fetch --prune first, then parses git branch -vv for branches marked : gone].
If the script outputs __NONE__, report that no stale branches were found and stop.
Show the user the list of branches that will be deleted. Format as a simple list:
These local branches have been deleted from the remote:
- feature/old-thing
- bugfix/resolved-issue
- experiment/abandoned
Delete all of them? (y/n)
Wait for the user's answer using the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded) or request_user_input in Codex. Fall back to presenting the list in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question.
This is a yes-or-no decision on the entire list -- do not offer multi-selection or per-branch choices.
If the user confirms, delete each branch. For each branch:
git worktree list | grep "\\[$branch\\]")git worktree remove --force "$worktree_path"git branch -D "$branch"Report results as you go:
Removed worktree: .worktrees/feature/old-thing
Deleted branch: feature/old-thing
Deleted branch: bugfix/resolved-issue
Deleted branch: experiment/abandoned
Cleaned up 3 branches.
If the user declines, acknowledge and stop without deleting anything.