From claude-resources
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:pr-complete [-c/--close] [-k/--keep-issue] [-w/--watch-ci] [-now/--no-wait][-c/--close] [-k/--keep-issue] [-w/--watch-ci] [-now/--no-wait]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This PR is checked, reviewed, and no other tasks are left. Complete the following:
This PR is checked, reviewed, and no other tasks are left. Complete the following:
On Claude Code on the web (
$CLAUDE_CODE_REMOTE=true): followweb/web-mode.md. Check CI, merge the PR, and close the linked issue via the GitHub MCP (pull_request_read/get_check_runs,merge_pull_request,issue_write), notgh. Branch deletion — see web-mode.md §5: when the PR's head is theclaude/*session branch (the common web case — head=$WEB_BASE, base=$WEB_PARENT), merge via MCPmerge_pull_requestWITHOUT any branch-delete (nodelete_branch:true). The web platform owns the session branch — never delete it. Deleting aclaude/agent-fix-*fix branch is fine; deleting the session branch is not. Translate the--delete-branchin Step 1 /--no-waitaccordingly: on web, drop the delete for the session branch.
Before anything else, run git status and git diff --stat to check for unstaged or staged-but-uncommitted changes.
/pr-complete./commits push to commit and push automatically, then continue to step 1./commits push first, then re-invoke /pr-complete." and stop here.gh pr view and gh pr checks--no-wait / -now was passed → skip the CI wait and merge immediately (see "--no-wait (-now) option" below)/watch-ci to monitor CI in the backgroundgh pr merge --merge --delete-branch (on web (web-mode.md §5): MCP merge_pull_request with NO branch-delete when the head is the claude/* session branch — the web owns it; only claude/agent-fix-* heads may be deleted)Important: Before merging, verify:
/watch-ci and stop), unless --no-wait was passedIf any CI checks fail, report the failure and do not merge (unless --no-wait was explicitly passed — see below).
--no-wait (-now) optionIf --no-wait or -now is passed, skip the CI watch entirely and merge the PR immediately, regardless of check status:
/watch-cigh pr merge --merge --delete-branch straight away--close / --keep-issue / --watch-ci) as normalWhen to use: the user has already verified locally that the changes are good (or doesn't care about CI for this merge) and wants the PR merged now without waiting on the pipeline. This is an explicit opt-in — never assume --no-wait from context.
Note: --no-wait only skips waiting for CI checks. The --watch-ci (-w) option, which watches post-merge CI on the target branch, is independent and still works alongside -now.
--close (-c) optionIf --close or -c is passed, after the PR is successfully merged:
gh pr view --json closingIssuesReferencesCheck if it is an epic issue (one that holds sub-issues):
a. Fetch the issue body: gh issue view <number> --json body
b. Look for task list entries referencing issues in the body:
Patterns: - [ ] #N, - [x] #N, - [ ] owner/repo#N, - [x] owner/repo#N
c. Also try the GitHub sub-issues API: gh api repos/{owner}/{repo}/issues/<number>/sub_issues
(this returns a list if the newer GitHub sub-issues feature is in use)
If sub-issues are found (either from the body task list or the API):
gh issue view <sub-issue-number> --json stategh issue close <sub-issue-number>gh issue close <number>If no sub-issues are found (regular issue):
gh issue close <number>--keep-issue (-k) optionIf --keep-issue or -k is passed, after the PR is successfully merged:
--close)[PR-Merged][Confirm] to the issue title:gh issue edit <number> --title "[PR-Merged][Confirm] <original title>"Note: --keep-issue and --close are mutually exclusive. If both are passed, --keep-issue takes precedence.
--watch-ci (-w) optionIf --watch-ci or -w is passed, after the PR is successfully merged:
gh run list --branch <base-branch> --limit 5 --json databaseId,name,status,conclusion/watch-ci to monitor the merge target branch CI in the background/watch-ci already handles merged PRs — it will detect the merged state and watch the target branch CIThis option is only activated when explicitly passed. Without -w, pr-complete does not watch post-merge CI.
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesDrives 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.
Babysits GitHub PR until merge-ready by running pr-merge-prep every 10 minutes, monitoring CI status, reviews, and conflicts, then asks for explicit merge confirmation.
Verifies CI status, local tests, and repo safety before merging a PR, with post-merge health monitoring. Use when landing a completed implementation.