Branch janitor
Skill rafaelghif/antigravity-agents/.agents/skills/branch-janitor
Enterprise-Grade Guardrails, Zero-Assumption Execution, and Quality Gates for Autonomous AI Coding Agents.
npx -y skills add rafaelghif/antigravity-agents --skill branch-janitorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Scans for and safely deletes stale or merged local and remote branches.
SKILL.md
1.5 KB, as published. Nobody here has run it
Branch Janitor Skill
Objective
Eradicate leftover stale branches in both local and remote repositories to keep the project clean, solving the exact issue where agents or users forget to clean up feature/ and hotfix/ branches after merging.
When to Execute
- When explicitly requested by the user to "clean up branches".
- As a fallback if the
git-workflowskill failed to delete a branch during its PR merge step.
Execution Steps
- Identify Merged Branches:
- Run
git fetch --pruneto synchronize with remote. - Run
git branch --merged main -rto identify all remote branches that have been merged into main. - Run
git branch --merged mainto identify all local branches that have been merged into main.
- Run
- Safe Deletion Filter:
- MUST ignore
main,master,develop, andstagingbranches. Do NOT attempt to delete them.
- MUST ignore
- Execution:
- For every target local branch:
git branch -d <branch_name> - For every target remote branch (e.g.
origin/feature/abc):git push origin --delete feature/abc
- For every target local branch:
- Verification:
- Run
git ls-remote --heads originto verify no target branches remain. - Update
.agents/brain/audit.jsonlwith the branches that were deleted.
- Run