branch-cleanup
Installation
SKILL.md
Branch cleanup
Authors GitHub Actions workflows that delete stale branches. This skill installs
workflows; it never deletes anything itself. At runtime there is no agent and no model
call — deterministic bash + gh only.
Verified GitHub behaviour (the delete event, ruleset errors, gh footguns, base-branch
semantics) lives in reference/github-facts.md. Read it
before changing any deletion logic.
The one rule that must never be relaxed
Before deleting ANY branch, check for open PRs that target it as base:
gh pr list --base <branch> --state open --json number --limit 1000