Finish PR — Git skill for Claude Code
Post-merge cleanup -- verify merge state, sync dev, delete branch, close issue.
How to install Finish PR
Installs to ~/.claude/commands/xencon-aixcl-finish-pr.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/xencon/aixcl/HEAD/.claude/commands/finish-pr.md -o ~/.claude/commands/xencon-aixcl-finish-pr.md Restart Claude Code, or start a new session, for it to be picked up.
What Finish PR does
description: Post-merge cleanup -- verify merge state, sync dev, delete branch, close issue
The human says a PR is merged. VERIFY IT FIRST -- humans are sometimes mistaken, and a PR can be CLOSED without being merged:
!`gh pr list --repo xencon/aixcl --state all --limit 5 --json number,state,title --jq '.[] | "#\(.number) \(.state) \(.title)"'`
For the PR in question (ask which one if ambiguous, or take it from $ARGUMENTS):
- Confirm the state is exactly
MERGED: `gh pr view --
Alternatives in Git
- GitHub Review PR — Use when a PR needs full review — resolves merge conflicts with the base first, then fixes CI failures, then a 1.5k ★
- Worktree Rm — Remove a git worktree and optionally delete its branch 387 ★
- Drive Acquisition — Work GitHub issues that drive acquisition — verify relevance, close stale ones, fan out at most two engineer a 324 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
PR Merged
Post-merge cleanup — checkout main, pull latest, delete the feature branch, and close the linked work item.
PR Post Merge
Clean up after a PR is merged — close fork issue, update local branch, delete issue branch
Dip
Post-merge cleanup — switch to base branch, pull latest, delete the merged feature branch, restore any stash.
Hybrid Complete
Complete Hybrid Ralph task in worktree, verify all stories complete, commit code changes (excluding planning f
Find Unfinished
Find work left half-done by interrupted agent sessions — reconstruct intent from recent session transcripts an
Finish Plan
Finish a plan whose work is pushed — retire PLAN.md, fast-forward the default branch, delete the plan's branch
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Autopilot Worker
Autopilot worker — implements ONE GitHub issue (or a BUNDLED BATCH of bundle-safe issues) end-to-end (version
Cleanup Phase 1
Runs phase 1 (dead code) and phase 1.5 (duplicate functions) of a codebase cleanup that is already under way.