pr
Installation
SKILL.md
PR
Open a pull request for the current branch: draft a title and description from the diff against the target branch, fill in the repo's PR template, get your review, then create it with gh pr create.
1. Load or bootstrap the repo config
Read docs/agents/pull-requests.md for this repo's target branch, direct-push policy, draft-by-default, and PR template location.
If that file doesn't exist yet, offer to create it:
- Target branch: the repo's actual default branch (
gh repo view --json defaultBranchRef). - Direct push to target branch: infer from GitHub branch protection on that branch (
gh api repos/<owner>/<repo>/branches/<branch>/protection). Protected with required pull requests → "not allowed". No protection configured → don't assume "allowed"; ask instead. - Draft by default: propose
false, shown to the user for confirmation like the drafted PR itself. - PR template: check this repo for its own
.github/PULL_REQUEST_TEMPLATE.mdfirst; if it has none, check<owner>/.githubfor the same path (GitHub's own repo-then-org resolution order). Ask if neither exists.
Once confirmed, write the file and ask whether to commit it on the current branch, folded into the PR this session is about to open, or on a separate branch as its own PR. Either is legitimate, don't assume.