clean-gone

Removes stale Git branches and associated worktrees automatically.

3|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/smykla-skalski/sai --skill clean-gone-smykla-skalski
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-gone
Source: https://github.com/smykla-skalski/sai/tree/main/git/skills/clean-gone
Command: npx skills add https://github.com/smykla-skalski/sai --skill clean-gone-smykla-skalski

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automatically cleans up local Git branches that have been deleted from the remote or fully merged, along with their associated worktrees, keeping your repository tidy.

Core Features & Use Cases

  • Automated Branch Cleanup: Removes local branches whose remote tracking branches are gone.
  • Merge Detection: Identifies and removes branches that have been fully merged into the main branch.
  • Worktree Management: Deletes worktrees associated with cleaned-up branches.
  • Use Case: After merging a pull request, you can run this Skill to automatically delete the feature branch and its corresponding worktree, preventing clutter.

Quick Start

Run the clean-gone skill to clean up your local git branches and their worktrees.

Frequently Asked Questions about clean-gone

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

FAQPage Schema
How do I clean up local git branches that have been deleted from the remote?

To clean up local git branches deleted from remote tracking, you can use an automated cleanup tool to remove them and their associated worktrees, keeping your repository tidy without manual deletion.

How do I automatically remove stale git branches and their worktrees?

Automatically removing stale git branches and their worktrees is done by identifying local branches whose remote tracking is gone, then deleting both the branches and linked worktrees to maintain a clean repository state.

Can I preview stale branch deletion before running the cleanup?

Yes, you can preview stale branch deletion before running the cleanup by using a dry-run mode, which shows exactly which local branches and worktrees will be removed without executing the deletion.

Does the automated branch cleanup also remove fully merged git branches?

Yes, automated branch cleanup identifies and removes local git branches that have been fully merged into the main branch, preventing repository clutter while safely deleting integrated feature branches.

How do I delete local git branches without removing their associated worktrees?

You can delete local git branches without removing associated worktrees by running the cleanup process with an option to skip worktree removal, allowing you to manage branches independently of your worktree setup.