clean-gone-branches

Remove git branches marked as 'gone' and their worktrees from a local repository.

2|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/dceoy/ai-coding-agent-skills --skill clean-gone-branches-dceoy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-gone-branches
Source: https://github.com/dceoy/ai-coding-agent-skills/tree/main/skills/clean-gone-branches
Command: npx skills add https://github.com/dceoy/ai-coding-agent-skills --skill clean-gone-branches-dceoy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of removing stale git branches marked as 'gone' and their associated worktrees, providing a quick cleanup solution for local repositories.

Core Features & Use Cases

  • Automate Cleanup: Identifies and removes deleted branches and worktrees to keep repositories clean and organized.
  • Use Case: Ideal for developers maintaining large repositories with multiple contributors, where deleted branches often accumulate locally.

Quick Start

Run the 'clean-gone-branches' skill to clean up all git branches marked as 'gone'.

Frequently Asked Questions about 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 are marked as gone?

To clean up local git branches marked as gone, you can run the clean-gone-branches skill. It automatically identifies and removes deleted branches and their associated worktrees from your local repository without requiring explicit user input.

What are gone branches in git and when should I remove them?

Gone branches in git are local branches whose remote counterparts have been deleted. You should remove them to maintain repository health and organization, especially in large repositories with multiple contributors where deleted branches often accumulate locally.

Does removing gone git branches also delete their associated worktrees?

Yes, removing gone git branches also deletes their associated worktrees. The cleanup process handles both the local branch references and the linked worktree directories to ensure complete repository maintenance.

Can I automate stale branch cleanup for local repositories with multiple contributors?

You can automate stale branch cleanup for local repositories with multiple contributors by running the clean-gone-branches skill. It provides a quick cleanup solution by identifying and removing branches marked as gone and their worktrees.

What is the best way to maintain repository health by removing deleted git worktrees?

The best way to maintain repository health by removing deleted git worktrees is to run an automated cleanup skill. It identifies git branches marked as gone and removes both the branches and their associated worktrees from the local repository.