Create a Pull Request
Create a PR only after the repository passes its quality and security gate. After creation, hand ownership to review-pr; do not reproduce its review workflow here.
Workflow
1. Validate the repository
- Read
$ARGUMENTS before deriving anything. Preserve issue references such as Closes #456 verbatim, use free text as the PR description basis, and pass through --draft.
- Verify GitHub authentication, current branch, unpushed commits, repository status, and the changed-file scope.
- Read applicable
CONTRIBUTING.md and PR templates.
- Check for merge conflicts, missing tests, and other repository blockers.
- Run the project-specific lint, type-check, test, build, and security checks.
- Resolve failures and rerun the complete gate before creating the PR.
Use requirements, quality validation, repository templates, and failure resolution.
2. Assemble and create the PR
- Generate an imperative, conventional PR title of at most 70 characters.
- Assemble the body using PR structure.
- Preserve the issue reference from
$ARGUMENTS; identify additional related issues without changing the supplied reference.
- Apply labels based on the changed files.
- Warn when the target is not the repository default branch: GitHub does not auto-close linked issues on non-default branches.
- Run
gh pr create with the assembled title, body, labels, reviewers, assignees, and --draft when requested.
Read auto-closing keywords before writing issue references and examples when the body or title needs a concrete model.
3. Hand off exactly once
Capture the URL returned by gh pr create.
Normalize the PR number from GitHub's data, not by parsing the URL:
PR=$(gh pr view "$PR_URL" --json number --jq '.number')
Read review-pr handoff.
Start the standalone review-pr workflow exactly once with the normalized PR number. Use a host-supported continuation or dispatch mechanism. If the host cannot dispatch a sibling skill from inside the current skill, use the bundled operational references and scripts under references/ and scripts/ as the implementation fallback. In Pi, invoke monitor_start for every fallback review poll using the sentinel contract in references/runbook.md; do not emit a slash command as if it were a callable tool.
Do not report completion or return to the caller until review-pr owns the PR.
create-pr owns PR creation. review-pr owns baseline review, CI and comment monitoring, triage, fixes, closeout, merge, and post-merge cleanup. Do not call review-pr twice and do not run a second review loop from this skill.
Protected workflow
This skill is the only PR-creating path. Other skills delegate here instead of calling gh pr create directly. No direct pushes to main or develop.
References
- Requirements
- Quality validation
- Repository templates
- Failure resolution
- PR structure
- Auto-closing keywords
- Review-pr handoff
- Review-pr operational references, review loop, and closeout
- Review-pr scripts
- Commit standards
- Examples
1---2name: create-pr-23description: Creates a GitHub pull request after repository validation, then starts the standalone review-pr workflow for CI monitoring, comment triage, closeout, and merge. Use when asked to create or submit a pull request.4---56# Create a Pull Request78Create a PR only after the repository passes its quality and security gate. After creation, hand ownership to `review-pr`; do not reproduce its review workflow here.910## Workflow1112### 1. Validate the repository1314- Read `$ARGUMENTS` before deriving anything. Preserve issue references such as `Closes #456` verbatim, use free text as the PR description basis, and pass through `--draft`.15- Verify GitHub authentication, current branch, unpushed commits, repository status, and the changed-file scope.16- Read applicable `CONTRIBUTING.md` and PR templates.17- Check for merge conflicts, missing tests, and other repository blockers.18- Run the project-specific lint, type-check, test, build, and security checks.19- Resolve failures and rerun the complete gate before creating the PR.2021Use [requirements](references/requirements.md), [quality validation](references/quality-validation.md), [repository templates](references/repository-templates.md), and [failure resolution](references/failure-resolution.md).2223### 2. Assemble and create the PR2425- Generate an imperative, conventional PR title of at most 70 characters.26- Assemble the body using [PR structure](references/pr-structure.md).27- Preserve the issue reference from `$ARGUMENTS`; identify additional related issues without changing the supplied reference.28- Apply labels based on the changed files.29- Warn when the target is not the repository default branch: GitHub does not auto-close linked issues on non-default branches.30- Run `gh pr create` with the assembled title, body, labels, reviewers, assignees, and `--draft` when requested.3132Read [auto-closing keywords](references/auto-closing-keywords.md) before writing issue references and [examples](references/examples.md) when the body or title needs a concrete model.3334### 3. Hand off exactly once3536- Capture the URL returned by `gh pr create`.37- Normalize the PR number from GitHub's data, not by parsing the URL:3839 ```bash40 PR=$(gh pr view "$PR_URL" --json number --jq '.number')41 ```4243- Read [review-pr handoff](references/review-pr-handoff.md).44- Start the standalone `review-pr` workflow exactly once with the normalized PR number. Use a host-supported continuation or dispatch mechanism. If the host cannot dispatch a sibling skill from inside the current skill, use the bundled operational references and scripts under `references/` and `scripts/` as the implementation fallback. In Pi, invoke `monitor_start` for every fallback review poll using the sentinel contract in `references/runbook.md`; do not emit a slash command as if it were a callable tool.45- Do not report completion or return to the caller until `review-pr` owns the PR.4647`create-pr` owns PR creation. `review-pr` owns baseline review, CI and comment monitoring, triage, fixes, closeout, merge, and post-merge cleanup. Do not call `review-pr` twice and do not run a second review loop from this skill.4849## Protected workflow5051This skill is the only PR-creating path. Other skills delegate here instead of calling `gh pr create` directly. No direct pushes to `main` or `develop`.5253## References5455- [Requirements](references/requirements.md)56- [Quality validation](references/quality-validation.md)57- [Repository templates](references/repository-templates.md)58- [Failure resolution](references/failure-resolution.md)59- [PR structure](references/pr-structure.md)60- [Auto-closing keywords](references/auto-closing-keywords.md)61- [Review-pr handoff](references/review-pr-handoff.md)62- [Review-pr operational references](references/runbook.md), [review loop](references/review-loop.md), and [closeout](references/closeout.md)63- [Review-pr scripts](scripts/)64- [Commit standards](references/commit-standards.md)65- [Examples](references/examples.md)