From implement-lifecycle
Merge a PR and update upstream GitHub issues with progress. Validates readiness, squash-merges, deletes branch, and posts issue updates. Triggers: /merge-pr, merge this PR
How this skill is triggered — by the user, by Claude, or both
Slash command
/implement-lifecycle:merge-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Merge PR #$ARGUMENTS and update all linked GitHub issues with what was delivered.
Merge PR #$ARGUMENTS and update all linked GitHub issues with what was delivered.
gh pr view $ARGUMENTS --json number,title,body,state,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,headRefName,baseRefName,additions,deletions,changedFilesgh pr view $ARGUMENTS --comments 2>/dev/null || echo "NO_COMMENTS"gh pr checks $ARGUMENTS 2>/dev/null || echo "NO_CHECKS"Check that the PR is safe to merge. For each check, determine pass/fail:
OPEN. If already merged or closed, report and stop.mergeable must not be CONFLICTING. If conflicts exist, report and stop.pr-check skill against the PR. All checks must pass (WARN is acceptable, FAIL is not). Fix any failures if possible; otherwise report what needs to be fixed and stop.reviewDecision and baseRefName:
CHANGES_REQUESTED, stop and report.main or master: require APPROVED. If REVIEW_REQUIRED or empty/null, escalate to the user and wait for explicit confirmation.If validation fails, stop and report exactly what needs to be fixed. Do not merge.
If validation requires human judgment (e.g., a check is flaky, unresolved conversations), stop and consult the user with the evidence.
Squash-merge the PR and delete the remote branch:
gh pr merge $ARGUMENTS --squash --delete-branch
If the merge fails, report the error and stop.
Extract issue references from the PR title and description. Look for:
Closes #N, Fixes #N, Resolves #N (case-insensitive) — the PR fully addresses the issueRelates to #N, Part of #N — the PR partially addresses or relates to the issueFor each referenced issue, fetch with gh issue view <N> --json state,title and post an update:
For closing references (issue should be auto-closed by GitHub):
gh issue comment <N> --body "$(cat <<'EOF'
## Delivered
**PR:** #<pr-number> — <PR title>
### Changes delivered
- <bullet summary extracted from PR description and diff>
This PR fully addresses this issue.
EOF
)"
For partial references:
gh issue comment <N> --body "$(cat <<'EOF'
## Progress Update
**PR:** #<pr-number> — <PR title>
### Changes delivered
- <bullet summary extracted from PR description>
### Remaining work
<What this issue still needs. If unclear, state "See issue description for remaining scope.">
EOF
)"
If no issues are referenced, skip this step.
Output a summary:
## Merge Complete
**PR:** #<number> — <title>
**Merged to:** <base branch>
**Issues updated:** <list of issue numbers, or "none">
### Changes
- <bullet summary>
Stop and consult the user when:
npx claudepluginhub benjamcalvin/bootstraps --plugin implement-lifecycleRuns a 4-step PR close sequence: reviewer-summary comment, squash-merge with PR title as commit subject, delete remote branch, close linked tracker issues. Use when merging or closing a PR.
Monitors CI checks and merges a pull request when all checks pass. Use when a PR is reviewed and approved but CI is still running.
Drives existing GitHub/GitLab PRs/MRs to merge: monitors CI/CD status, fixes issues in PR scope via sub-skills, handles multi-round code reviews, resolves comments until all requirements met.