Overview
Add a cleanup-branch project-level skill that switches to master, pulls latest changes, and deletes the current feature branch — safe to invoke after a PR is merged.
Motivation
After merging a PR, the cleanup sequence (checkout master → pull → delete branch) is repetitive. A dedicated skill eliminates the need to remember the -D flag nuance and the master-guard safety check.
File Locations
| File |
Action |
.claude/skills/cleanup-branch/SKILL.md |
Create |
Behaviour
- Captures the current branch name before switching
- Checks out
master and pulls
- Deletes the feature branch using
-D (safe after remote merge)
- Guards against deleting
master itself
Verification
Overview
Add a
cleanup-branchproject-level skill that switches to master, pulls latest changes, and deletes the current feature branch — safe to invoke after a PR is merged.Motivation
After merging a PR, the cleanup sequence (checkout master → pull → delete branch) is repetitive. A dedicated skill eliminates the need to remember the
-Dflag nuance and the master-guard safety check.File Locations
.claude/skills/cleanup-branch/SKILL.mdBehaviour
masterand pulls-D(safe after remote merge)masteritselfVerification
.claude/skills/cleanup-branch/SKILL.md/cleanup-branchon a feature branch switches to master, pulls, and deletes the branch/cleanup-branchon master does NOT delete master