gh-create-pr by cherryhq/cherry-studio
npx skills add https://github.com/cherryhq/cherry-studio --skill gh-create-pr.github/pull_request_template.md。origin,但需询问用户是否希望使用不同的远程仓库。git push -u <remote> <head-branch>
确定基础分支:
origin 的官方仓库 (CherryHQ/cherry-studio):默认基础分支是来自 origin 的 main,但允许用户明确指定一个基础分支。origin 的复刻仓库:使用 检查可用的远程仓库,默认基础分支可能是 或其他远程分支。始终假设用户希望将头部分支合并到 CherryHQ/cherry-studio/main,除非用户明确指定了基础分支。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
git remote -vupstream/main创建一个临时文件并写入 PR 正文:
pr_body_file="$(mktemp /tmp/gh-pr-body-XXXXXX).md"N/A 或 None。预览临时文件内容。显示文件路径(例如,/tmp/gh-pr-body-XXXXXX.md)并在创建前请求明确确认。如果用户明确表示不需要预览/确认(例如,自动化工作流),则跳过此步骤。
确认后,创建 PR:
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
清理临时文件:rm -f "$pr_body_file"
报告创建的 PR URL 并总结标题/基础分支/头部分支以及任何所需的后续步骤。
| 变更类型 | 发布说明 | 文档 [x] |
|---|---|---|
| 面向用户的新功能 / 设置 / UI | 描述变更 | ✅ |
| 用户可见的 Bug 修复 | 描述修复 | ✅(如果行为已更改) |
| 行为变更 / 默认值变更 | 描述 + action required | ✅ |
| 面向用户的依赖项中的安全修复 | 描述修复 | ✅(如果使用方式已更改) |
| CI / GitHub Actions 变更 | NONE | ❌ |
| 内部重构(用户无法察觉) | NONE | ❌ |
| 开发 / 构建工具变更 | NONE | ❌ |
| 仅开发依赖项更新 | NONE | ❌ |
| 仅测试 / 代码风格变更 | NONE | ❌ |
# 读取模板
cat .github/pull_request_template.md
# 首先在聊天中显示完整的 Markdown 正文
pr_body_file="$(mktemp /tmp/gh-pr-body-XXXXXX).md"
cat > "$pr_body_file" <<'EOF'
...已填充的模板正文...
EOF
# 仅在用户明确确认后运行
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
rm -f "$pr_body_file"
每周安装次数
1
代码仓库
GitHub 星标数
41.0K
首次出现
5 天前
安全审计
安装于
mcpjam1
github-copilot1
junie1
windsurf1
zencoder1
crush1
.github/pull_request_template.md before drafting the PR body.origin, but ask the user if they want to use a different remote.git push -u <remote> <head-branch>
Determine the base branch:
origin: default base is main from origin, but allow the user to explicitly indicate a base branch.origin: check available remotes with git remote -v, default base may be upstream/main or another remote. Always assume that user wants to merge head to CherryHQ/cherry-studio/main, unless the user explicitly indicates a base branch.Create a temp file and write the PR body:
pr_body_file="$(mktemp /tmp/gh-pr-body-XXXXXX).md"N/A or None.Preview the temp file content. Show the file path (e.g., /tmp/gh-pr-body-XXXXXX.md) and ask for explicit confirmation before creating. Skip this step if the user explicitly indicates no preview/confirmation is needed (for example, automation workflows).
After confirmation, create the PR:
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
Clean up the temp file: rm -f "$pr_body_file"
Report the created PR URL and summarize title/base/head and any required follow-up.
Never skip template sections.
Never rewrite the template format.
Keep content concise and specific to the current change set.
PR title and body must be written in English.
Never create the PR before showing the full final body to the user, unless they explicitly waive the preview or confirmation.
Never rely on command permission prompts as PR body preview.
Release note & Documentation checkbox — both are driven by whether the change is user-facing. Use the table below:
| Change type | Release note | Docs [x] |
|---|---|---|
| New user-facing feature / setting / UI | Describe the change | ✅ |
| Bug fix visible to users | Describe the fix | ✅ if behavior changed |
| Behavior change / default value change | Describe + action required | ✅ |
| Security fix in a user-facing dependency | Describe the fix | ✅ if usage changed |
| CI / GitHub Actions changes | NONE | ❌ |
| Internal refactoring (user cannot tell) | NONE |
# read template
cat .github/pull_request_template.md
# show this full Markdown body in chat first
pr_body_file="$(mktemp /tmp/gh-pr-body-XXXXXX).md"
cat > "$pr_body_file" <<'EOF'
...filled template body...
EOF
# run only after explicit user confirmation
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
rm -f "$pr_body_file"
Weekly Installs
1
Repository
GitHub Stars
41.0K
First Seen
5 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
mcpjam1
github-copilot1
junie1
windsurf1
zencoder1
crush1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
147,400 周安装
| ❌ |
| Dev / build tooling changes | NONE | ❌ |
| Dev-only dependency bump | NONE | ❌ |
| Test-only / code style changes | NONE | ❌ |