Cc-wf-studio pr-to-main-cleanup
Clean up merged feature branches after PR to main is merged. Use when the user says "ブランチ削除", "cleanup", "マージ後の片付け", or wants to delete a merged branch.
install
source · Clone the upstream repo
git clone https://github.com/breaking-brake/cc-wf-studio
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/breaking-brake/cc-wf-studio "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/pr-to-main-cleanup" ~/.claude/skills/breaking-brake-cc-wf-studio-pr-to-main-cleanup && rm -rf "$T"
manifest:
.claude/skills/pr-to-main-cleanup/SKILL.mdsource content
PR to Main Cleanup
Delete merged feature branches after PR is merged to main.
Workflow
-
Gather context (parallel):
to identify current branchgit branch
to confirm current stategit log --oneline -1
-
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
(force delete) since git cannot detect squash merges as "merged"-D - Always pull latest main before deleting to sync merge status