ce-clean-gone-branches

Remove local branches lacking remote counterparts after user confirmation.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/lucking7/compound-engineering-skills --skill ce-clean-gone-branches-lucking7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-clean-gone-branches
Source: https://github.com/lucking7/compound-engineering-skills/tree/main/skills/ce-clean-gone-branches
Command: npx skills add https://github.com/lucking7/compound-engineering-skills --skill ce-clean-gone-branches-lucking7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps users remove local branches that have been deleted from the remote repository, keeping the local codebase clean and up-to-date.

Core Features & Use Cases

  • Branch Cleanup: Detects and removes local branches that no longer have a remote counterpart.
  • Worktree Removal: Also removes any associated worktrees to free up disk space.
  • User Confirmation: Prompts the user to confirm the deletion of the identified branches before proceeding.
  • Script-Based Discovery: Utilizes a script to discover branches that are considered 'gone'.

Quick Start

Run the 'clean-gone' script to start the cleanup process for 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 that have no remote tracking branch?

To clean up local git branches lacking remote tracking, this Skill runs a discovery script to find 'gone' branches and removes them after user confirmation. It ensures a clean local codebase by safely removing branches no longer tracked in the remote repository.

What is a gone branch in git version control?

A gone branch in git version control is a local branch whose remote counterpart has been deleted from the remote repository. This Skill identifies these remote tracking branches and removes them locally to keep your codebase clean and up-to-date.

Can I remove associated git worktrees when cleaning up gone branches?

Yes, you can remove associated git worktrees during branch cleanup. This Skill removes local branches without remote tracking and also removes any associated worktrees to free up disk space, ensuring complete version control cleanup.

Does this branch cleanup process require confirmation before deleting local branches?

Yes, the branch cleanup process requires user confirmation before deleting local branches. This Skill prompts you to confirm the deletion of identified gone branches, reducing the risk of accidental deletion during repository maintenance.

What's the best way to remove local branches that are no longer tracked in the remote repository?

The best way to remove local branches no longer tracked in the remote repository is using a script-based discovery approach. This Skill discovers gone branches, prompts for confirmation, and removes them along with associated worktrees for a clean codebase.