CloseBranch — Git skill for Claude Code
Close out a branch after its PR is merged/closed - switches to the PR's base branch (main, or the todo's arc branch), pulls latest, deletes local and remote branch.
How to install CloseBranch
Installs to ~/.claude/skills/keithdv-claudeskills-closebranch/SKILL.md
mkdir -p ~/.claude/skills/keithdv-claudeskills-closebranch && curl -fsSL https://raw.githubusercontent.com/keithdv/ClaudeSkills/HEAD/commands/closeBranch.md -o ~/.claude/skills/keithdv-claudeskills-closebranch/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What CloseBranch does
name: closeBranch description: Close out a branch after its PR is merged/closed - switches to the PR's base branch (main, or the todo's arc branch), pulls latest, deletes local and remote branch argument-hint: "" allowed-tools: ["Bash"]
Clean up after a merged or closed PR by switching to the branch the PR targeted and deleting the branch.
Under the iterative-todo branch model a plan or punchlist branch PRs into the todo's **arc branch** (`{id}-arc` — e.g. `lcr-rewrite`), and the arc P
Alternatives in Git
- 40+ Claude Code Tips — Tips for getting the most out of Claude Code, including a custom status line script, cutting the system prompt 5.8k ★
- Intel — On-demand intelligence fetch for a target — CVEs, disclosed reports, new features 3.8k ★
- Prepare Commit — Comment out inappropriate logging before commit 1.6k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Sweep For Archive
Close-out sweep over a recent window — verify what closed was really delivered, complete anything whose PR mer
Sync Develop
Schedule sync with develop branch - adds to TODO, executes at convenient moment (after current task). Use when
PR Merged
Post-merge cleanup — checkout main, pull latest, delete the feature branch, and close the linked work item.
Agents Close Gitworktree
You are closing out a git worktree after completing (or abandoning) work. This command updates the tracking re
PR Post Merge
Clean up after a PR is merged — close fork issue, update local branch, delete issue branch
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Bead Epic Auditor
Use this agent when auditing bead epics for closure drift — finding open epics whose entire child set is alrea
Courier
Close out a delivered effort. Packages the output, generates recipient-specific briefs, and writes the permane