mcpbeat

Pr To Main Cleanup

breaking-brake/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.

238 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
5341
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/breaking-brake/cc-wf-studio --skill pr-to-main-cleanup

The instruction itself

4 sections, as written by the author

PR to Main Cleanup

Delete merged feature branches after PR is merged to main.

Workflow

  • Gather context (parallel):
  • git branch to identify current branch
  • git log --oneline -1 to 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

How to use it

Copy the folder

Take breaking-brake/pr-to-main-cleanup from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.