loerei/myskills/prune-branches
Claude Code and agent skill by loerei/myskills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Use when auditing, reviewing, or deleting merged and stale Git branches.
Install
npx vskill@latest install loerei/myskills/prune-branchesSKILL.md
The same SKILL.md was published earlier as loerei/myskills/prune-branches.
Prune Branches
Audit-first branch pruning. ALWAYS report branch classifications and obtain explicit user approval before deleting any branch.
Classification Heuristics
| Branch Condition | Action | |
|---|---|---|
Directly Merged: Listed by git branch --merged <default> or git branch -r --merged origin/<default> | Mark safe to delete | |
Squash-Merged: git diff origin/<default>...origin/<branch> --stat is empty (0 insertions, 0 deletions) OR git cherry returns - | Mark safe to delete (squash-merged) | |
Unmerged Active: git cherry returns + and tree diff has changes | Recommend: PR & merge, cherry-pick, or abandon |
Workflow
- Audit (Read-Only):
- Detect default branch:
git symbolic-ref refs/remotes/origin/HEAD(fallback tomain). - Sync tracking refs:
git fetch --all --prune. - Classify all local and remote branches against the table above.
- Present the categorized audit report (Directly Merged, Squash-Merged, Active Unmerged), then STOP and await explicit user confirmation.
- Prune (Post-Approval Only):
- If the active branch is slated for deletion, switch first:
git checkout <default>. - Delete local branches:
git branch -d <branch>(use-DONLY for confirmed squash-merged branches). - Delete remote branches:
git push origin --delete <branch1> <branch2> .... - Resync tracking refs:
git fetch --all --prune.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingproductivity/prune-branches/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/loerei/myskills/prune-branches)