Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.3 KiB
Markdown
50 lines
1.3 KiB
Markdown
---
|
|
name: gitflow branch-cleanup
|
|
description: Remove merged and stale branches locally and optionally on remote
|
|
agent: git-assistant
|
|
---
|
|
|
|
# /gitflow 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
|
|
|
|
1. **Display header** - Show GIT-FLOW Branch Cleanup header
|
|
2. **Prune remote refs** - `git fetch --prune`
|
|
3. **Find merged branches** - `git branch --merged <base-branch>`
|
|
4. **Find stale branches** - `git branch -vv | grep ': gone]'`
|
|
5. **Exclude protected** - Never delete protected branches (per git-safety.md)
|
|
6. **Present findings** - Show merged, stale, and protected lists
|
|
7. **Confirm deletion** - Options: all, merged only, stale only, pick, cancel
|
|
8. **Execute cleanup** - Delete selected branches
|
|
9. **Report** - Show deletion summary
|
|
|
|
## Output
|
|
|
|
```
|
|
Cleaned up:
|
|
Local (merged): 3 branches deleted
|
|
Local (stale): 2 branches deleted
|
|
Remote: 2 branches deleted
|
|
|
|
Repository is tidy!
|
|
```
|