git-branch-cleanup

Installation
SKILL.md

Purge stale git branches

Delete branches that are already merged. Protect every branch that still holds work.

A squash merge rewrites the commits. After a squash merge, git branch --merged does not list the branch, and git branch -d refuses to delete it. Both tools are therefore unsafe signals here. This skill asks GitHub what the pull request merged, then compares that commit to the local branch tip.

When to use

Use this skill when any of these are true:

  • Merged pull requests left local branches behind.
  • git branch -vv marks branches with [gone].
  • The repository has no auto-delete setting, and merged remote branches remain.
  • The user names one or more branches to purge.
Installs
62
Repository
dzhuneyt/skills
First Seen
Jun 13, 2026