From dev
Merge a pull request after checking CI status and cleaning up, favoring squash merging. Invoke with /merge or /merge <pr-number-or-url> to merge.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev:mergeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Merge a pull request after verifying CI has passed, then cleanup the branch.
Merge a pull request after verifying CI has passed, then cleanup the branch.
The user may provide a PR number or URL as an argument (e.g. /merge 42 or /merge https://github.com/org/repo/pull/42). If provided, use it directly with gh pr view <pr-number-or-url> — this skips the need to discover the PR from the current branch and means Step 1 does not require being on the feature branch.
Work through each step sequentially. Do not skip steps.
If a PR number or URL was provided:
Run in parallel:
git status
gh pr view <pr-number-or-url> --json number,url,title,baseRefName,headRefName,state
The only blocker here is uncommitted changes — inform the user and suggest /commit if found. You do NOT need to be on the feature branch since the PR is already identified.
If no PR was provided (current branch mode):
Run in parallel:
git status
git branch --show-current
gh pr view --json number,url,title,baseRefName,headRefName,state 2>/dev/null
Evaluate the results:
/commit. Stop.main or master? Inform the user they need to be on a feature branch. Stop./pr if yes). Stop if no.Save the PR number, base branch name, and head branch name from gh pr view output for later steps.
Run: gh pr checks <pr-number>
All passed: Continue to Step 3.
Any failed: Stop immediately. Do NOT merge and do NOT ask the user whether to override. Report each failed check by name along with its conclusion and details URL so the user can investigate. Example format:
CI has failed — not merging. Failed checks:
- <check name> (<conclusion>) — <details URL>
- <check name> (<conclusion>) — <details URL>
This is a hard stop. The user must fix the failures and re-run the skill.
In progress: Poll every 30 seconds, up to 10 minutes. If still not complete, inform the user and stop.
No checks configured: Warn the user and ask for confirmation before proceeding. (This is the one confirmation pause this skill keeps — merging with no CI at all is genuinely risky and worth the friction.)
Run: gh pr merge <pr-number> --squash --delete-branch
If the merge fails, report the error to the user and stop. Do not attempt fallback merge strategies automatically.
Run these commands sequentially in a single bash call:
git checkout <base-branch> && git pull origin <base-branch> && git branch -D <head-branch>
Use -D (force delete) because squash merge means the local branch won't show as fully merged. If the local branch doesn't exist (e.g. PR was provided by number/URL and never checked out locally), skip the -D step. If branch deletion fails, warn the user.
Report the successful merge and cleanup.
npx claudepluginhub rob1256/claude-plugins --plugin devGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.