Skip to content
Back to skills

Pr To Main Cleanup

ASecurity

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

  • 5,366 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
ai-agentsbashgit

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add breaking-brake/cc-wf-studio --skill pr-to-main-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr To Main Cleanup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr To Main Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/breaking-brake-pr-to-main-cleanup/badge)](https://www.skillsdirectory.com/skills/breaking-brake-pr-to-main-cleanup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

```bash
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.