# Large Scale Branch Hygiene

> Systematic approach to cleaning stale branches across multiple repos while preserving active work

- Skill: `vamseeachanta/large-scale-branch-hygiene` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/large-scale-branch-hygiene`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/large-scale-branch-hygiene/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/large-scale-branch-hygiene

---


# Large-Scale Branch Hygiene Workflow

When managing many repos with accumulated stale branches: (1) inventory all repos and categorize branches (worktree artifacts, orphaned histories, merged-upstream), (2) identify patterns (e.g., `archive/*` branches from restructurings that can't merge), (3) use dry-runs to verify before mass deletion, (4) handle protected branches separately and verify API errors aren't transient, (5) stash active work, merge valuable unmerged branches, clean merged branches, then restore stash. Key insight: pull latest before merge attempts—upstream may have already merged branches you think are local.
