Refactored commands to extract reusable skills following the Commands → Skills separation pattern. Each command is now <50 lines and references skill files for detailed knowledge. Plugins refactored: - claude-config-maintainer: 5 commands → 7 skills - code-sentinel: 3 commands → 2 skills - contract-validator: 5 commands → 6 skills - data-platform: 10 commands → 6 skills - doc-guardian: 5 commands → 6 skills (replaced nested dir) - git-flow: 8 commands → 7 skills Skills contain: workflows, validation rules, conventions, reference data, tool documentation Commands now contain: YAML frontmatter, agent assignment, skills list, brief workflow steps, parameters Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.3 KiB
1.3 KiB
name, description, agent
| name | description | agent |
|---|---|---|
| branch-cleanup | Remove merged and stale branches locally and optionally on remote | git-assistant |
/branch-cleanup - Clean Merged and Stale Branches
Skills
- skills/visual-header.md
- skills/git-safety.md
- skills/sync-workflow.md
- skills/environment-variables.md
Purpose
Remove branches that have been merged OR whose remote tracking branch no longer exists.
Parameters
| Parameter | Description |
|---|---|
--dry-run |
Preview without deleting |
--remote |
Also delete remote branches |
--stale-only |
Only delete stale branches (upstream gone) |
Workflow
- Display header - Show GIT-FLOW Branch Cleanup header
- Prune remote refs -
git fetch --prune - Find merged branches -
git branch --merged <base-branch> - Find stale branches -
git branch -vv | grep ': gone]' - Exclude protected - Never delete protected branches (per git-safety.md)
- Present findings - Show merged, stale, and protected lists
- Confirm deletion - Options: all, merged only, stale only, pick, cancel
- Execute cleanup - Delete selected branches
- Report - Show deletion summary
Output
Cleaned up:
Local (merged): 3 branches deleted
Local (stale): 2 branches deleted
Remote: 2 branches deleted
Repository is tidy!