GitHub Pull Request
Use this low-freedom subskill to own pull-request reuse, creation, readiness, review status, and explicit merge. Follow the canonical docs/github-delivery-contract.md when available.
Commands
upsert: reuse the pull request for the resolved head branch or create one.
status: report identity, head/base, draft state, mergeability, checks, approvals, unresolved threads, and linked issue.
review: inspect review feedback and gates without merging.
merge: merge only after all strict gates and immediate explicit user confirmation.
Upsert
- Require a resolved issue and a published, non-primary branch from
$github-issue and $github-branch.
- Search open and closed pull requests by exact head repository and branch. Reuse the one compatible open pull request. Stop on multiple candidates, a conflicting base, or an already-merged/closed candidate rather than creating a duplicate.
- Create only when no pull request exists for the head. Base it on the detected primary branch. Include a concise summary, validation evidence, risks or follow-ups, and
Closes #N for the resolved issue.
- Mark ready only when intended changes are committed and pushed, proportionate validation passed, and no known blocking finding remains. Otherwise preserve or create a draft and explain the blockers.
- Ordinary shipping ends after the ready pull request is published or updated. Do not merge it.
Merge Gate
Before requesting confirmation, fetch fresh GitHub state and prove all of the following:
- the exact pull request is open, non-draft, and targets the detected primary branch;
- its head matches the reviewed commit and is current enough for repository policy;
- GitHub reports no conflicts and an allowed merge method is selected;
- every required check has passed, with no pending, skipped-required, cancelled, or failed check;
- required approvals are present and no change request remains;
- no unresolved review thread, accepted Critical/High finding, or other documented blocker remains;
- the linked issue is correct and will close through merge, not before it.
Show repository, pull-request number and URL, exact head SHA, base, merge method, check/approval/thread summary, and issue disposition. Obtain explicit user confirmation immediately before the merge mutation. A prior request to ship, publish, finish, or create a pull request is not merge confirmation.
After merge, verify the merged SHA and linked issue state. Branch cleanup is separate and routes to $github-branch cleanup; do not delete branches implicitly.
Safety
- Never enable auto-merge, bypass branch protection, dismiss reviews, resolve threads without addressing them, admin-merge, or merge with failing/unknown gates.
- Never treat local test success as a substitute for required remote checks.
- Authentication or API uncertainty blocks mutation and never authorizes a direct-primary fallback.
Output
Report pull-request identity, reuse/create decision, readiness, exact gate status, linked issue behavior, and the next review or remediation action.
1---2name: github-pr3description: Safely upsert, inspect, review, or explicitly merge the pull request for an issue-backed work branch4---56# GitHub Pull Request78Use this low-freedom subskill to own pull-request reuse, creation, readiness, review status, and explicit merge. Follow the canonical `docs/github-delivery-contract.md` when available.910## Commands1112- `upsert`: reuse the pull request for the resolved head branch or create one.13- `status`: report identity, head/base, draft state, mergeability, checks, approvals, unresolved threads, and linked issue.14- `review`: inspect review feedback and gates without merging.15- `merge`: merge only after all strict gates and immediate explicit user confirmation.1617## Upsert18191. Require a resolved issue and a published, non-primary branch from `$github-issue` and `$github-branch`.202. Search open and closed pull requests by exact head repository and branch. Reuse the one compatible open pull request. Stop on multiple candidates, a conflicting base, or an already-merged/closed candidate rather than creating a duplicate.213. Create only when no pull request exists for the head. Base it on the detected primary branch. Include a concise summary, validation evidence, risks or follow-ups, and `Closes #N` for the resolved issue.224. Mark ready only when intended changes are committed and pushed, proportionate validation passed, and no known blocking finding remains. Otherwise preserve or create a draft and explain the blockers.235. Ordinary shipping ends after the ready pull request is published or updated. Do not merge it.2425## Merge Gate2627Before requesting confirmation, fetch fresh GitHub state and prove all of the following:2829- the exact pull request is open, non-draft, and targets the detected primary branch;30- its head matches the reviewed commit and is current enough for repository policy;31- GitHub reports no conflicts and an allowed merge method is selected;32- every required check has passed, with no pending, skipped-required, cancelled, or failed check;33- required approvals are present and no change request remains;34- no unresolved review thread, accepted Critical/High finding, or other documented blocker remains;35- the linked issue is correct and will close through merge, not before it.3637Show repository, pull-request number and URL, exact head SHA, base, merge method, check/approval/thread summary, and issue disposition. Obtain explicit user confirmation immediately before the merge mutation. A prior request to ship, publish, finish, or create a pull request is not merge confirmation.3839After merge, verify the merged SHA and linked issue state. Branch cleanup is separate and routes to `$github-branch cleanup`; do not delete branches implicitly.4041## Safety4243- Never enable auto-merge, bypass branch protection, dismiss reviews, resolve threads without addressing them, admin-merge, or merge with failing/unknown gates.44- Never treat local test success as a substitute for required remote checks.45- Authentication or API uncertainty blocks mutation and never authorizes a direct-primary fallback.4647## Output4849Report pull-request identity, reuse/create decision, readiness, exact gate status, linked issue behavior, and the next review or remediation action.