approve-pr

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

Context

Repository: !gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "unknown" Default branch: !git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@refs/remotes/origin/@@' || echo main Current branch: !git branch --show-current 2>/dev/null My login: !gh api user --jq .login 2>/dev/null || echo "unknown"

Instructions

Review a GitHub PR as a maintainer and, when it earns it, post the single GitHub approval; otherwise report and decline. Auto-post only the approval; non-approving writes need an explicit opt-in. Execute immediately without asking.

Delegate the approve-or-decline verdict to verify-pr (consume its recommendation), the unresolved-thread triage to verify-pr-comments, the review body to summarize-review when your own commits are on the PR, and the optional post-approval merge to ship-pr (it owns the merge gate and the merge, and validates the merge method). Own only the self-approval guard, the verdict-to-action mapping, and the gh pr review write. Invoke the others by name and act on their output; never inline or reimplement their logic.

Process

  1. Parse the PR and flags. The leading positional of $ARGUMENTS is a PR number (e.g. 4621) or a full PR URL; flags follow. The default with no flag is approve-only. --merge hands the PR to ship-pr after a successful approval, forwarding any pass-through merge flags (--squash, --admin, --delete-branch) to it unvalidated; --request-changes and --comment opt into a non-approving write. Derive OWNER and REPO from the Repository probe.

  2. Fetch PR state and run the self-approval guard. Read gh pr view <n> --repo <o>/<r> --json number,author,headRefOid,state,reviewDecision. If state is not OPEN, report and stop. Self-approval guard (owned): if author.login equals the My login probe, stop before any write. GitHub rejects approving your own PR (Can not approve your own pull request), so report that it needs a different maintainer, or /ship-pr <n> to drive your own change to merge while it waits for someone else's approval. Record headRefOid for the stale-head recheck in step 5.

Installs
8
First Seen
Jun 26, 2026
approve-pr — okisdev/ai-reference