git-cleanup

Categorize local git branches and worktrees into merged, squash-merged, superseded, or active.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/erenisiklar/Pusula --skill git-cleanup-erenisiklar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-cleanup
Source: https://github.com/erenisiklar/Pusula/tree/main/.claude/skills/git-cleanup
Command: npx skills add https://github.com/erenisiklar/Pusula --skill git-cleanup-erenisiklar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Local git branches and worktrees accumulate, creating clutter, confusion about what is merged, and wasted time managing cleanup.

Core Features & Use Cases

  • Categorizes branches into merged, squash-merged, superseded, or active work
  • Guides safe deletion with mandatory gates and explicit user confirmations
  • Analyzes worktrees and branches to present a clear, actionable cleanup plan

Quick Start

Run this skill on your repository to generate a safe, guided cleanup plan and prompts for user approval.

Frequently Asked Questions about git-cleanup

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

FAQPage Schema
How do I safely clean up local git branches and worktrees?

To safely clean up local git branches and worktrees, you can use a guided process that categorizes them into merged, squash-merged, superseded, or active states before prompting for user confirmation to execute any deletions.

How can I tell which local git branches have been squash-merged?

Identifying squash-merged local git branches involves analyzing branch history to categorize them against the main branch, distinguishing superseded branches from active ones to determine safe deletion candidates.

What is the best way to delete superseded git branches without losing active work?

The best way to delete superseded git branches safely is to use a tool that applies safety gates, categorizing branches by their merge status and requiring explicit user confirmation before any destructive action.

Does git branch cleanup work with repositories using multiple worktrees?

Yes, git branch cleanup works with multiple worktrees by analyzing grouped branch and worktree data across the repository, presenting a clear actionable cleanup plan that preserves active worktrees.

Why do I need user confirmation prompts during git branch deletion?

User confirmation prompts during git branch deletion act as mandatory safety gates, ensuring that no destructive operations occur without explicit approval to prevent accidental loss of active or superseded work.