Branch done
Skill dkmqflx/git-workflow-plugin/plugins/git-workflow/skills/branch-done
Git branch/worktree lifecycle skills for Claude Code (worktree, branch, PR, cleanup)
npx -y skills add dkmqflx/git-workflow-plugin --skill branch-doneAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Delete the current feature branch and switch back to the base branch after opening a PR. Use when the user has just opened a PR and wants to clean up — phrases like "PR 올렸으니 정리해줘", "브랜치 정리해줘", "정리하고 돌아가줘", "clean up this branch", "delete feature branch", "/branch-done". Do NOT use inside a git worktree — that is the worktree-done skill.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.5 KB, as published. Nobody here has run it
Branch Done
After opening a PR, delete the current feature branch and switch back to the base branch.
When to apply
Cleaning up the main checkout after opening a PR. Do not apply inside a worktree — that is worktree-done.
Steps
- Record the current branch name:
git rev-parse --abbrev-ref HEAD. - Determine the base branch:
- Try
git symbolic-ref refs/remotes/origin/HEADand strip therefs/remotes/origin/prefix. - If that fails, use the first of
dev,main,masterthat exists locally (git show-ref --verify --quiet refs/heads/<name>). - If none exist, stop and ask the user which branch is the base.
- Try
- If the current branch is the base branch (or is itself
dev,main, ormaster), stop and notify the user — nothing to clean up. - Checkout the base branch and pull latest:
git checkout <base branch> && git pull - Delete the previous feature branch locally:
git branch -D <recorded branch> - Confirm in one line:
Cleaned up → back on <base branch>, deleted <branch>