git-clean-gone-branches
Clean Gone Branches
Delete local branches whose remote tracking branch has been deleted, including any associated worktrees.
Workflow
Step 1: Discover gone branches
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.
Step 2: Present branches and ask for confirmation
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 question tool (e.g., AskUserQuestion in Claude Code, request_user_input in Codex, ask_user in Gemini). If no question tool is available, present the list and wait for the user's reply before proceeding.
This is a yes-or-no decision on the entire list -- do not offer multi-selection or per-branch choices.
Step 3: Delete confirmed branches
If the user confirms, delete each branch. For each branch:
- Check if it has an associated worktree (
git worktree list | grep "\\[$branch\\]") - If a worktree exists and is not the main repo root, remove it first:
git worktree remove --force "$worktree_path" - Delete the branch:
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.
More from everyinc/every-marketplace
coding-tutor
Personalized coding tutorials that build on your existing knowledge and use your actual codebase for examples. Creates a persistent learning trail that compounds over time using the power of AI, spaced repetition and quizes.
24agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
24orchestrating-swarms
This skill should be used when orchestrating multi-agent swarms using Claude Code's TeammateTool and Task system. It applies when coordinating multiple agents, running parallel code reviews, creating pipeline workflows with dependencies, building self-organizing task queues, or any task benefiting from divide-and-conquer patterns.
23agent-native-architecture
Build applications where agents are first-class citizens. Use this skill when designing autonomous agents, creating MCP tools, implementing self-modifying systems, or building apps where features are outcomes achieved by agents operating in a loop.
23dhh-rails-style
This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals, Basecamp, HEY, or Campfire style. Embodies REST purity, fat models, thin controllers, Current attributes, Hotwire patterns, and the "clarity over cleverness" philosophy.
23frontend-design
Build web interfaces with genuine design quality, not AI slop. Use for any frontend work - landing pages, web apps, dashboards, admin panels, components, interactive experiences. Activates for both greenfield builds and modifications to existing applications. Detects existing design systems and respects them. Covers composition, typography, color, motion, and copy. Verifies results via screenshots before declaring done.
23