con un clic
merge-github-pr
Use when safely merge GitHub pull requests that are ready
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Use when safely merge GitHub pull requests that are ready
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Use when reviewing HTTP API design in a PR or change set — endpoints, routes, HTTP methods, status codes, idempotency, and input validation. Treats the API as a consumer-facing contract and flags resource-orientation, method-semantics, status-code, and trust-boundary violations. Read-only.
Use when checking that the pull request implementation actually fulfills the business requirements stated in the linked issue or task. Returns a plain-language markdown block that is the Functional review half of the two-part CR output (`@rules/code-review/general.mdc` Two-part CR output — Technical & Functional review): a full checklist of every extracted acceptance criterion with its status (Met / Not met / Partial / Divergent) and an explicit Goal met: Yes/No verdict, rendered on every run that has a linked tracker — including the fully affirmative report when every requirement is satisfied. No local file is created and the block is not embedded in the GitHub PR comment.
Use when run code review for a Bugsnag error and publish results to the linked GitHub PR and the Bugsnag error
Use when perform code review for GitHub pull requests and post findings as PR comments plus a non-technical summary to every linked issue
Use when run code review for JIRA issues and publish results to GitHub PR and JIRA
Use when senior PHP code review focused on architecture, business logic, and risk detection. Read-only.
| name | merge-github-pr |
| description | Use when safely merge GitHub pull requests that are ready |
| license | MIT |
| metadata | {"author":"Petr Král (pekral.cz)"} |
Merge pull requests that meet all required conditions.
@rules/git/general.mdc Merging; it is mandatory on every merge and is verified in step 2 below.skills/code-review-github/scripts/load-issue.sh <NUMBER|URL> — the single deterministic entry point. Never call gh pr view, gh pr checks, or gh api /repos/.../pulls/... directly. Read isDraft, mergeable, mergeStateStatus, reviewDecision, and statusCheckRollup[] off the resulting JSON document.For each PR, derive the verdict from the JSON document loaded in step 1:
@skills/code-review-github/SKILL.md / @skills/process-code-review/SKILL.md), confirm it reports criticalCount + moderateCount == 0, and confirm it reflects the head commit. Because the CR comment is upserted in place (@skills/code-review/SKILL.md Cross-run history — follow-up runs edit the same comment), use its updatedAt (not createdAt) for the staleness check: it is current only when updatedAt is at or after the newest commits[].authoredDate (the head commit). A comment whose updatedAt predates the head commit is stale and does not count. If no code-review comment exists, the latest one still carries Critical / Moderate findings, or its updatedAt predates the head commit, do not merge — report that the code-review gate is unmet and that the review must be run (or re-run) to convergence via @skills/code-review-github/SKILL.md + @skills/process-code-review/SKILL.md first. This gate is never waived — not by an explicit merge request, not by the billing exception below, and not by a GitHub reviewDecision == "APPROVED" on its own.isDraft == false. A Draft PR signals the review/fix loop has not converged (@rules/git/general.mdc Draft pull requests): the Draft state mirrors the unmet code-review gate, so do not merge a Draft and report it as skipped. If the PR's code review has in fact converged (0 Critical + 0 Moderate), it must first be promoted out of Draft by @skills/process-code-review/SKILL.md (gh pr ready) before this skill will merge it — never flip a Draft to ready here just to merge it. The billing exception below never relaxes this.mergeable == "MERGEABLE" and mergeStateStatus is not DIRTY or BEHINDstatusCheckRollup[] has a passing state (SUCCESS / NEUTRAL / SKIPPED), with the single billing exception below when the merge was explicitly requestedreviewDecision == "APPROVED"mergeStateStatus != "BEHIND"If any check fails:
A single, narrow exception relaxes the CI-passing check — only when the caller explicitly requested the merge (an automatic / opportunistic merge never qualifies):
statusCheckRollup[] are GitHub Actions runs that did not execute because of a billing / account-limit problem — typically a state of ERROR (or a workflow that never started) whose detail message is an unambiguous billing notice such as "The job was not started because recent account payments have failed or your spending limit needs to be increased", "billing", or "spending limit". In that case the gate ignores those specific entries and allows the merge.ERROR / FAILURE with no billing wording is a real failure — never assume billing. When in doubt, do not merge: report the ambiguous entry and stop.isDraft == true), a real CI failure (tests, lint, static analysis) on any non-billing entry, mergeStateStatus == "DIRTY" / "BEHIND", an unmergeable state, or reviewDecision != "APPROVED" still blocks the merge regardless of the explicit request.When the merge was not explicitly requested, this exception does not apply — a billing failure blocks like any other failing check.
@rules/git/general.mdc Worktrees / Workspaces), remove it now that the merge is complete:
--force.git worktree remove <path> — removes the worktree directory and its metadata.git worktree prune — cleans up any remaining stale worktree metadata.
If no worktree was explicitly created for this work unit (the default: agent worked in the shared tree), skip this step entirely.