Prune Branches

Reports a repo's stale branches grouped by why they are stale — merged into the integration branch (squash and rebase merges included), upstream gone, a closed PR that never merged, and no commits for 90 days — then deletes only what a human confirms. Local and remote branches list separately; a scope argument restricts a run to one side. Merged and upstream-gone form the default set; a closed PR and plain age are listed, never preselected. Protected branches are never offered. Forge chosen per-repo by config (root forge key) — GitHub via gh, GitLab via glab, against a host resolved per repo. Invoke manually only — never fires proactively and never deletes without an explicit yes. Use when the user wants to prune, clean up or list stale, merged or dead branches, asks which branches are safe to delete, or says things like "clean up the branches", "delete the merged branches", "Branches aufräumen", "alte Branches löschen".

TitusKirch 16e9aa3 3 files · 59.2 KB Updated

File contents

TitusKirch/skills/tree/main/skills/repo/prune-branches commit 16e9aa3bbb

Frequently asked questions

npx skillmds@latest add tituskirch/prune-branches