AGENT SKILL
pr-draft
Push dev branch and create a draft GitHub PR to master (auto-generates title/body from commits)
- License 许可
- MIT
- 最近更新
- 2026-05-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- pr-draft
- description
- Push dev branch and create a draft GitHub PR to master (auto-generates title/body from commits)
- allowed-tools
- Bash(git *, gh *)
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml101 B
03 SKILL.md 正文
Create Draft Pull Request
Current state
!git branch --show-current
!git status --short
!git log master..HEAD --oneline 2>/dev/null
Instructions
- Verify we are on the
devbranch. If not, abort with an error. - If there are uncommitted changes, commit them with an appropriate message first.
- Push the dev branch:
git push -u origin dev - Check if a PR already exists for dev → master:
gh pr list --head dev --base master --state open --json number,title,url- If a PR exists, show its URL and stop (don't create a duplicate).
- Auto-generate the PR title and body from commit history:
- Title: A concise summary of the changes (under 70 characters).
- Body: Summary bullet points derived from
git log master..dev --oneline.
- Create the draft PR:
gh pr create --draft --base master --head dev --title "THE TITLE" --body "THE BODY" - Show the PR URL when done.
04 同仓库更多 Skills
stop
Stop the running dev server
★ 1
status
Show current branch, working tree status, and any open PR
★ 1
run
Start the dev server in the background, or restart it if already running
★ 1
pr
Push dev branch and create a GitHub PR to master (auto-generates title/body from commits)
★ 1
merge
Squash-merge the open PR, pull master, and reset dev branch
★ 1
master
Checkout the master branch and pull latest changes
★ 1