Agent Skills: 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.

UncategorizedID: breaking-brake/cc-wf-studio/pr-to-main-cleanup

Install this agent skill to your local

pnpm dlx add-skill https://github.com/breaking-brake/cc-wf-studio/tree/HEAD/.claude/skills/pr-to-main-cleanup

Skill Files

Browse the full folder contents for pr-to-main-cleanup.

Download Skill

Loading file tree…

.claude/skills/pr-to-main-cleanup/SKILL.md

Skill Metadata

Name
pr-to-main-cleanup
Description
Clean up merged feature branches after PR to main is merged. Use when the user says "ブランチ削除", "cleanup", "マージ後の片付け", or wants to delete a merged branch.

PR to Main Cleanup

Delete merged feature branches after PR is merged to main.

Workflow

  1. Gather context (parallel):

    • git branch to identify current branch
    • git log --oneline -1 to confirm current state
  2. 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