ce-clean-gone-branches

Identify and remove local git branches lacking remote tracking branches.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Zeptiny/opencode-setup --skill ce-clean-gone-branches-zeptiny
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-clean-gone-branches
Source: https://github.com/Zeptiny/opencode-setup/tree/main/skills/ce-clean-gone-branches
Command: npx skills add https://github.com/Zeptiny/opencode-setup --skill ce-clean-gone-branches-zeptiny

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of cleaning up local branches that have been removed from the remote repository, freeing up local storage and maintaining repository integrity.

Core Features & Use Cases

  • Identifies Gone Branches: Detects branches that no longer have a remote tracking branch.
  • User Confirmation: Requests user confirmation before deleting branches to prevent accidental loss.
  • Clean-up and Reporting: Deletes identified branches and provides a summary of the clean-up process.
  • Worktree Cleanup: Handles associated worktrees, ensuring all related data is removed.

Quick Start

Run the following command to clean up branches: ce-clean-gone-branches

Frequently Asked Questions about ce-clean-gone-branches

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up local git branches without remote tracking?

To clean up local git branches without remote tracking, this Skill automatically identifies branches missing their remote counterpart and removes them after requesting your confirmation, ensuring safe and efficient repository management.

What is the best way to delete gone git branches and their worktrees?

Deleting gone git branches and their worktrees is handled by this Skill, which detects local branches lacking remote tracking branches and removes both the branch and its associated worktree data upon user confirmation.

Does this branch cleanup process ask for confirmation before deleting?

Yes, this branch cleanup process requires user confirmation before deleting any local branches, preventing accidental loss of your work while it automates the identification of branches without remote tracking.

When do I need to automate repository cleanup for local branches?

You need to automate repository cleanup for local branches when your remote tracking branches have been deleted and your local repository accumulates redundant branches, which this Skill identifies and removes to maintain repository integrity.

Can I use scripts to remove local branches that no longer have a remote tracking branch?

Yes, you can use the scripts component in this Skill to remove local branches that no longer have a remote tracking branch, automating the detection, confirmation, and deletion process to improve your repository management efficiency.