Loading...
Loading...
Report stale git branches with a keep, archive, or delete recommendation, and propose enabling delete-branch-on-merge. Use for "clean up stale branches", "delete merged branches", "delete branch on merge", "which branches are dead", or /branch-cleanup. Checks age, author, ahead/behind counts, merged status, open pull requests, and ruleset protection, then prints exact deletion commands that require explicit per-batch authorization before any push. Do NOT use for local git worktree management (worktree add, list, or prune) — that stays out of scope. One-time repository merge defaults and branch-protection rulesets belong to /gh-bootstrap; this skill reads and reports on that state but does not set it up.
npx skill4agent add paulnsorensen/git-gouda branch-cleanupgit worktree addlistprune/gh-bootstrapdelete_branch_on_mergegh api -X PATCH/gh-bootstrapREPO="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')"
gh api "repos/$REPO" --jq '.delete_branch_on_merge'falsegh api -X PATCH repos/{owner}/{repo} -F delete_branch_on_merge=true/gh-bootstrapPATCHpython3 "$BRANCH_CLEANUP_HELPER" --days 90 --github "$REPO"BRANCH_CLEANUP_HELPERSKILL.mdscripts/stale_branches.pygit log -1git rev-list --left-right --countgit branch -r --merged <default>gh pr list --head <branch> --state open --json number--githubgh api repos/{owner}/{repo}/rules/branches/ {branch}--githubrecommendationkeeparchivedeletereferences/policy.mdgit fetch --prune
git branch --merged <default>deletegit push origin --delete <branch>keepassets/stale-branch-report.yml.github/workflows/stale-branch-report.ymlactions/checkoutgit branch -rdelete/gh-bootstrap/prek/oss-hygiene