AGENT SKILL

GitHub PR 创建

pr

推送 dev 分支并创建一个到 master 的 GitHub PR(根据提交自动生成标题和正文)。

License 许可
MIT
最近更新
2026-05-15
Stars
★ 1
Forks
0

01 前言 Front Matter

name
pr
description
Push dev branch and create a GitHub PR to master (auto-generates title/body from commits)
allowed-tools
Bash(git *, gh *)
disable-model-invocation
true

03 SKILL.md 正文

Create Pull Request

Current state

!git branch --show-current !git status --short !git log master..HEAD --oneline 2>/dev/null

Instructions

  1. Verify we are on the dev branch. If not, abort with an error.
  2. If there are uncommitted changes, commit them with an appropriate message first.
  3. Push the dev branch: git push -u origin dev
  4. 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).
  5. 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.
  6. Create the PR:
    gh pr create --base master --head dev --title "THE TITLE" --body "THE BODY"
    
  7. Show the PR URL when done.

04 同仓库更多 Skills