branch-cleanup
Comprehensive git branch cleanup and organization
What this skill does
Perform a complete cleanup of local and remote branches after working on multiple PRs.
## Current State
Default branch: !`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"`
Current branch: !`git branch --show-current`
Fetch latest: !`git fetch --all --prune 2>&1`
## Branch Inventory
Local branches with tracking status:
!`git branch --format='%(refname:short) %(upstream:track)' | sort`
Recent branches by activity:
!`git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short) - %(committerdate:relative)'`
Remote branches:
!`git branch -r --format='%(refname:short)' | grep -v HEAD | sort`
## Cleanup Candidates
Merged into default branch: !`git branch --merged`
Branches with gone remotes:
!`git branch -vv | grep ': gone]' | awk '{print $1}' | sort`
## Protected Branches
Never delete branches matching these patterns:
- `main`, `master`, `develop`, `staging`, `production`
- `release/*` branches (unless explicitly confirmed)
- `renovate/*` branches (managed by Renovate bot)
- Current working branch
- Branches with unpushed commits (confirm first)
## Cleanup Workflow
### Phase 1: Analyze
Review the branch inventory above. Categorize branches:
- **Safe to delete**: Merged branches and branches with gone remotes (excluding protected)
- **Needs confirmation**: `release/*` branches, branches with unpushed commits
- **Protected**: All protected branch patterns and current branch
### Phase 2: Confirm Cleanup Plan
Present the cleanup plan and ask the user to select scope:
- **All safe**: Delete all merged and gone-remote branches
- **Merged only**: Delete only branches merged into default
- **Gone only**: Delete only branches with deleted remotes
- **Review each**: Confirm each branch individually
If "Review each" is selected, iterate through candidates asking per-branch confirmation.
### Phase 3: Execute Cleanup
After confirmation, execute in order:
1. Prune stale remote-tracking refs: `git remote prune origin`
2. Delete merged local branches: `git branch -d <branch>`
3. Delete gone-remote branches: `git branch -D <branch>`
Record each branch name and SHA before deleting: `git rev-parse <branch>`
If deletion fails, ask user: Force delete, Skip, or Abort.
### Phase 4: Remote Cleanup (Optional)
Ask whether to delete corresponding remote branches on origin.
### Phase 5: Summary
Report:
- Count of deleted branches by category
- Repository branch count (before and after)
- Recovery commands with commit SHAs for each deleted branch: `git checkout -b <branch> <sha>`
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.