Clean up local git branches and remotes accumulated from PR reviews. Use when the user asks to clean branches, remove stale remotes, or tidy up the local git state.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Clean local branches (except main and current branch) and non-origin remotes.
Useful after reviewing multiple PRs that leave behind tracking branches and contributor remotes.
Run these in parallel:
git branch
git remote
git status --short
git stash listPresent a summary of how many branches and remotes will be removed.
Stop and ask for confirmation if any of these are true:
mainList unmerged branches separately and let the user decide.
# Safe delete first (fails on unmerged branches)
git branch | grep -v '^\*' | grep -v '^\s*main$' | xargs git branch -d 2>&1
# Force-delete only with explicit user approval
git branch -D <branch>git remote | grep -v '^origin$' | xargs -I{} git remote remove {}git branch && echo "---" && git remoteReport what was cleaned up.
main or the current checked-out branchMirxa27/Mirxa-agent
157e0be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.