Not loaded · from skill-madness
Cleans up stale and merged git branches both local and remote. Prunes tracking refs, identifies branches safe to delete, flags orphaned branches, and presents a summary before acting.
Claude Code won't load this skill
It ships in skill-madness at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Systematically identify and remove branches that are no longer needed. Stale branches accumulate fast — especially when PRs auto-delete the remote branch on merge but the local tracking ref and local branch stick around. This skill walks through the cleanup safely so nothing important gets lost.
Start by fetching and pruning so the local view of remote branches is
accurate. Without this, you'd see stale origin/* refs for branches
GitHub already deleted on merge.
git fetch origin --prune
Don't assume main — check:
git symbolic-ref -q --short refs/remotes/origin/HEAD 2>/dev/null | sed 's@^origin/@@'
The -q flag suppresses the fatal error when origin/HEAD isn't set, and
--short strips the refs/remotes/ prefix. If that fails, fall back to
checking whether main or master exists locally. Use the result as
$DEFAULT for the rest of the workflow.
Run these four commands and cross-reference the results:
| Command | Purpose |
|---|---|
git branch -vv | Local branches with tracking status and ahead/behind |
git branch --merged origin/$DEFAULT | Local branches fully merged into the default branch |
git branch -r --merged origin/$DEFAULT | Remote branches fully merged |
git branch -r --no-merged origin/$DEFAULT | Remote branches with unmerged work (context only) |
From these results, build four categories:
--merged output, excluding the
default branch itself. These are safe to delete.-r --merged output, excluding
origin/HEAD and origin/$DEFAULT. These are safe to delete from the
remote.git branch -vv shows their tracking
remote as gone but they are NOT in the --merged list. These contain
unmerged work and need the user's attention.Show the user a clear, categorized summary before doing anything destructive:
**Safe to delete — N local branches merged into $DEFAULT:**
- branch-name-1
- branch-name-2
**Safe to delete — M remote branches merged into $DEFAULT:**
- origin/branch-name-1 → delete as `branch-name-1`
- origin/branch-name-2 → delete as `branch-name-2`
(or: "All merged remote branches were already pruned by GitHub.")
**Needs attention — K orphaned branches (remote gone, not merged):**
- branch-name (last commit: <short msg>)
**Keeping — J active unmerged branches:**
- branch-name → origin/branch-name
If any category is empty, say so briefly (e.g., "No orphaned branches.") rather than omitting the section — the user should see that every category was checked.
Wait for the user to confirm before proceeding to deletion.
Once the user confirms:
Local merged branches:
git branch -d branch1 branch2 branch3
Use -d (lowercase) which refuses to delete unmerged branches as a safety
net. Never use -D unless the user explicitly asks to force-delete an
unmerged branch.
Remote merged branches:
git push origin --delete branch1 branch2 branch3
Use bare branch names — strip the origin/ prefix. These may fail with
"remote ref does not exist" if GitHub already deleted them on PR merge.
That's expected — just note it and move on.
Final prune to clean up any remaining stale tracking refs:
git fetch origin --prune
Show the final branch state:
git branch -vv
Summarize what was done: how many local branches deleted, how many remote branches deleted, how many pruned, and what remains.
Never delete these, even if they appear in a merged list:
main, master, or whatever $DEFAULT resolved to)develop, staging, production (if they exist)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ivy00johns/skill-madness --plugin skill-madness87 skills in this plugin
/accessibility-auditAudit and fix web accessibility against WCAG 2.2 AA, Section 508 and the ADA: axe scan, keyboard, screen-reader and zoom checks, plain-language content and PDFs, source fixes, and an honest conformance report (ACR/VPAT draft). Use for any a11y review, fix or compliance question. Trigger on "accessibility audit", "is this ADA compliant", "Section 508", "WCAG", "VPAT", "a11y"./andonRun work through a live Andon board (the kanban that dispatches cards to Claude Code, Codex and Gemini on your machines): push a plan's cards with the skills each run must load, read the board, answer what needs you, administer a machine, and refresh this skill when Andon changes. Trigger on "/andon", "put this plan on andon", "what needs me on andon", "why isn't my card running".
/Other plugins' skills for the same job