skills/github-pr-merge/SKILL.md
Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.
npx skillsauth add fvadicamo/dev-agent-skills github-pr-mergeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Merges Pull Requests after validating pre-merge checklist and handling post-merge cleanup.
!gh pr view --json number,title,state -q '"PR #\(.number): \(.title) (\(.state))"' 2>/dev/null
Verify all review comments have at least one reply:
REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner')
PR=$(gh pr view --json number -q '.number')
# Find unreplied comment IDs
gh api repos/$REPO/pulls/$PR/comments --jq '
[.[] | select(.in_reply_to_id) | .in_reply_to_id] as $replied |
[.[] | select(.in_reply_to_id == null) | select(.id | IN($replied[]) | not) | .id]
'
If unreplied comments exist:
gh pr view $PR --json milestone -q '.milestone.title // "none"'
gh api repos/$REPO/milestones --jq '[.[] | select(.state=="open")] | length'
If open milestones exist but the PR has none, surface a warning in the checklist:
- Milestone: ⚠ not assigned (open milestones exist)
Do NOT block the merge for a missing milestone. It is a warning only.
Run tests, linting, and verify CI checks. All MUST pass before proceeding.
gh pr checks $PR
ALWAYS show checklist summary and ask before merging:
Pre-merge checklist:
- Comments: all replied
- Tests: passing
- Lint: passing
- CI: green
- Milestone: v0.1.0 (or ⚠ not assigned)
Ready to merge PR #X. Proceed?
gh pr merge $PR --merge --delete-branch --body "$(cat <<'EOF'
- Key change 1
- Key change 2
- Key change 3
Reviews: N/N addressed
Tests: X passed (Y% cov)
Refs: Task N, Req M
EOF
)"
Merge strategy: always --merge (merge commit), never squash or rebase.
--delete-branch automatically deletes the remote branch after merge.
git checkout develop && git pull origin develop
If the PR had a milestone, check whether all items are now closed:
MILESTONE=$(gh pr view $PR --json milestone -q '.milestone.number // empty')
if [ -n "$MILESTONE" ]; then
gh api repos/$REPO/milestones/$MILESTONE \
--jq '"Open: \(.open_issues) | Closed: \(.closed_issues) | \(.title)"'
fi
open_issues == 0: inform the user and ask whether to close the milestonegh api repos/$REPO/milestones/$MILESTONE --method PATCH --field state="closed"
open_issues > 0: report remaining open items count. No action needed.Concise format for a clean git log:
- Key change 1 (what was added/fixed)
- Key change 2
- Key change 3
Reviews: 7/7 addressed (Gemini 5, Codex 2)
Tests: 628 passed (88% cov)
Refs: Task 8, Req 14-15
--merge), never squash/rebasedevelopment
Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context injection and subagent execution.
tools
Handles PR review comments and feedback resolution. Use when user wants to resolve PR comments, handle review feedback, fix review comments, address PR review, check review status, respond to reviewer, verify PR readiness, review PR comments, analyze review feedback, evaluate PR comments, assess review suggestions, or triage PR comments. Fetches comments via GitHub CLI, classifies by severity, applies fixes with user confirmation, commits with proper format, replies to threads.
development
Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.
testing
Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing PRs, use github-pr-merge instead.