- name
- gh-create-pr
- description
- Create or update GitHub pull requests using the repository-required workflow and template compliance. Use when asked to create/open/update a PR so the assistant reads `.github/pull_request_template.md`, fills every template section, preserves markdown structure exactly, and marks missing data as N/A or None instead of skipping sections.
GitHub PR Creation
Stack tooling
This repository ships .agents/skills/gh-stack/SKILL.md as a public project skill; developers do not install the agent skill separately. Read it before operating on stacked branches or PRs. Agents that consume .agents/skills/ discover it directly. If a Claude checkout is missing .claude/skills/gh-stack, run pnpm skills:sync followed by pnpm skills:check; do not download a separate global copy.
Before the first gh stack command in a task, verify the GitHub CLI and install the official extension if it is missing:
command -v gh >/dev/null 2>&1 || {
echo "GitHub CLI is required: https://cli.github.com/" >&2
exit 1
}
gh auth status
if ! gh stack --help >/dev/null 2>&1; then
gh extension install github/gh-stack
fi
gh stack --help >/dev/null
Stop if authentication, installation, or the final verification fails. Do not infer a stack with ad hoc Git commands. For human-authored Cherry PRs, use gh stack push, create each compliant PR through this skill from bottom to top, then link the existing PRs with gh stack link; gh stack submit --auto creates PRs outside the template-compliant body flow and must not bypass this workflow.
Workflow
- Read
.github/pull_request_template.mdbefore drafting the PR body. - Collect PR context from the current branch (base/head, scope, linked issues, testing status, breaking changes, release note content). Resolve the live base and run
pnpm change:scope --base <verified-base-ref>; do not infer scope from the latest commit alone. - Read
.agents/notes/README.mdand classify the change:- Fill
Agent Notewith the repository path, orN/A — <reason>for a local/mechanical change. - For a Spec PR, fill
Spec PR: This PRand list every AC. - For an implementation layer, link the Spec PR and list only the AC IDs covered by this layer. Verify an
APPROVEDreview whosecommit_idequals the current Spec head; a stale approval does not authorize implementation. - For a direct bug fix with durable rationale, link its implemented
bug-fixnote and useSpec PR: N/A. - Automation-authored PRs (repository workflows and Dependabot) are exempt from these metadata fields. Do not make their bodies imitate a human-authored PR.
- Fill