prune-merged-branches

Official

Safely delete merged local branches

Authorpaywhereb
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents accidental loss of un-pushed work by deleting only local git branches that are confirmed as fully merged on GitHub, including protection against squash-merge pitfalls.

Core Features & Use Cases

  • Squash-merge aware safety: Refuses to rely on git’s ancestry-only “merged” heuristics and instead verifies the merged PR’s recorded head SHA is present in the local branch.
  • Report-first cleanup: Classifies branches into DELETE, KEEP, and SKIP and shows exactly what would be removed before deleting anything.
  • Guardrails against uncertainty: Never deletes the default branch or the currently checked-out branch, and never deletes branches in KEEP/SKIP states even with affirmative confirmation.

Quick Start

Run the prune-merged-branches skill from your repository root to generate a safety report and then delete only the branches it marks as safe.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: prune-merged-branches
Download link: https://github.com/paywhereb/paywhere-claude-plugins/archive/main.zip#prune-merged-branches

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.