
Pr To Main Cleanup
Handles the post-merge cleanup dance of deleting both local and remote feature branches after your PR gets squashed into main. Since squash merges don't leave the commit history that lets git auto-detect merged branches, this uses force delete and chains the whole sequence together: switch to main, pull latest, nuke the local branch with -D, then delete the remote. It's triggered by saying "cleanup", "ブランチ削除", or similar phrases in English or Japanese. Saves you from manually typing that four-command chain every time, which is the kind of small friction that adds up when you're merging frequently.
- GitHub stars
- 5.1K
- last updated
- Jun 11, 2026
Install
$ npx -y skills add breaking-brake/cc-wf-studio --skill pr-to-main-cleanup --agent claude-codeInstalls into .claude/skills of the current project.
Files
PR to Main Cleanup
Delete merged feature branches after PR is merged to main.
Workflow
-
Gather context (parallel):
git branchto identify current branchgit log --oneline -1to confirm current state
-
Execute cleanup:
- Switch to main branch
- Pull latest changes from origin
- Delete local feature branch
- Delete remote feature branch
Commands
git checkout main && git pull origin main && git branch -D <branch-name> && git push origin --delete <branch-name>
Important Notes
- PRs to main are always squash-merged, so use
-D(force delete) since git cannot detect squash merges as "merged" - Always pull latest main before deleting to sync merge status
Sponsors
Details
- Repository
- github.com/breaking-brake/cc-wf-studio
- Category
- Git & Pull Requests
- First seen
- Jun 11, 2026