open-pr
Open or update a GitHub pull request for the current branch after its work is committed. Use when the user asks to open, create, publish, refresh, or update a PR.
- License 许可
- MIT
- 所属仓库
- PetrIvan/website
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- open-pr
- description
- Open or update a GitHub pull request for the current branch after its work is committed. Use when the user asks to open, create, publish, refresh, or update a PR.
03 SKILL.md 正文
Open Pull Request Protocol
Use committed branch state as the PR source. Leave unrelated uncommitted work untouched.
Preconditions
- Read
AGENTS.md. - Confirm the repository, remote, and GitHub CLI authentication exist.
- Determine the base branch, defaulting to
main. - Confirm the current branch is not the base branch.
git status --short
git branch --show-current
git remote -v
gh auth status
Do not create a PR from main. Do not commit local changes implicitly.
Prepare the branch
Push without force:
git push -u origin HEAD
Check for an existing pull request:
gh pr view --json number,url,title,body,baseRefName
Update an existing PR for the branch instead of opening a duplicate.
Write the PR
Fetch the base and review the complete branch delta:
git fetch origin main
git log --oneline origin/main..HEAD
git diff --stat origin/main..HEAD
git diff origin/main..HEAD
Replace main when another base was requested.
Use this body shape, omitting empty sections:
## Summary
<What this changes and why>
## Changes
- <Coherent change>
## Validation
- `<command>`
## Notes
<Launch safeguards, follow-ups, or reviewer context>
Use a concise conventional title under 72 characters. Write the body to a
temporary Markdown file and pass it with --body-file.
Create:
gh pr create --base main --title "<type>: <summary>" --body-file <path>
Update:
gh pr edit <number> --title "<type>: <summary>" --body-file <path>
Describe the current PR as a whole, not as an incremental changelog. Never add agent attribution, merge automatically, request reviewers, alter repository settings, or enable Pages unless explicitly asked. Report the PR URL.
04 同仓库更多 Skills
writing
Draft, review, or edit prose in this repository while matching the requested scope.
open-pr
Open or update a GitHub pull request for the current branch.
commit
Create scoped conventional commits from approved changes, validate them, and push.
writing
Draft, review, or edit prose for this repository and its public presentation, including website copy, blog posts, project write-ups, metadata, résumé text, technical documentation, announcements, and social posts. Use when a request concerns wording, structure, tone, citations, or Markdown conventions. Enforce public/private publication boundaries, keep reviews read-only, and make broad authorship changes only when the user explicitly requests them.
commit
Create scoped conventional commits from approved local changes, validate them, and push. Use only when the user explicitly asks to commit, invokes /commit or $commit, or clearly asks to ship approved work.