git-branch-cleanup
Installation
SKILL.md
Git Branch Cleanup
Use this skill to safely remove merged or stale branches with explicit user confirmation.
Safety Rules
- Stop if the working tree is not clean.
- Detect the default branch from
origin/HEADand fall back tomain, thenmaster. - Never delete protected branches.
- Never force delete unless the user explicitly approves.
Workflow
-
Check repository state
git status --porcelain- If not clean, ask the user to commit or stash first.
-
Detect default branch
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
Related skills
More from tmeister/skills
laravel-simplifier
Simplify and refine PHP/Laravel code for clarity and maintainability without changing behavior.
15commit
Generate a conventional commit message from staged changes and commit safely.
6feature-issue
Implement a feature from a GitHub issue with a structured, review-first workflow.
6draft-issue
Research and draft a high quality GitHub issue before creating it.
6prd-to-json
Convert .prd PRD markdown into .prd/prd.json with validation.
6bug-issue
Diagnose and fix a GitHub issue with a reproduction-first workflow.
6