gh-create-pr
Skill233 starsChanged 7 months agoMITView on GitHub
使用 GitHub CLI (gh) 推送当前分支并创建或更新 PR。在用户说「提 PR」「新建 PR」「用 gh 建 PR」「submit PR」「create pull request」时使用。
- Commits and pushes
Files
使用 gh 创建 / 更新 PR
何时使用
- 用户说:提 PR、新建 PR、用 gh 建 PR、submit PR、create pull request、开 PR
- 当前分支有未推送提交,需要推送到 origin 并创建或更新 PR
流程
1. 确认状态
git status -sb
git log -1 --oneline- 若有未提交变更,先按项目规范提交(见下方「提交信息规范」)。
- 若
[ahead N],需要先 push。
2. 推送当前分支
若当前分支领先 origin:
git push -u origin <当前分支名>或简写(当前分支已跟踪 origin 时):
git push origin3. 创建 PR
gh pr create --base main --head <当前分支名> --title "<标题>" --body "<正文>"- --base:目标分支,一般为
main或master,可与仓库默认分支一致。 - --head:当前分支;不写时 gh 会使用当前检出分支。
- 若该分支已有开放中的 PR,gh 会提示已存在并给出链接,不会重复创建。
4. 标题与正文
- 标题:简短说明变更,可与最近一次 commit 的 summary 一致或稍作归纳。
- 正文:可选;可包含「变更说明」「测试说明」「关联 Issue」等。若用户未指定,可用简洁模板,例如:
## 变更说明
- (根据 commit 或改动简要列出)
> Submitted by Cursor提交信息规范(本仓库)
提交时遵循既有规范:
- 格式:
Component: Emoji 描述或type(scope): description - Props、组件名用反引号;中英文之间加空格
- 多类变更按组件/类型分条写
示例:MarkdownEditor: 优化 Jinja 模板(可访问性、错误处理、样式与单测)
命令速查
| 步骤 | 命令 |
| 看状态 | git status -sb |
| 推送 | git push -u origin $(git branch --show-current) |
| 建 PR | gh pr create --base main --title "标题" --body "正文" |
| 查看已有 PR | gh pr list --head $(git branch --show-current) |
注意
- 执行
gh前需已登录:gh auth login。 - 若遇 TLS / 证书错误,可带
required_permissions: ["all"]再试。 - 创建 PR 需要网络权限。
Other versions6 projects use a version of this.
Word for word · 1
- antdigital-ai/agentic-ui★ 233100% same
Edited · 0
None found.
Wrote their own version · 5
- CherryHQ/cherry-studio★ 53ksame name
- bastani-inc/atomic★ 861same name
- flora131/atomic★ 861same name
- gjoranv/claude-plan-skills★ 5same name
- kelvincushman/orphus★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use gh-commit, prek and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
kelvincushmanSkillgh-commit
Create well-formatted commits with conventional commit format.
Also in 3 projects that use this
bmsuisseSkillprek
Set up code formatting and pre-commit hooks using prek (fast Rust-based alternative to pre-commit) with prek.toml config. Use whenever the user wants to configure prek, add formatters, set up pre-commit hooks, or enforce code style. Triggers on "set up prek", "add formatting", "configure formatters", "pre-commit setup", "add ruff", "set up biome", "configure sqlfmt". Works on new and existing projects. Always use when init-app-stack has just run.
Also in 3 projects that use this
carapace-shSkillbun
Use when working with the bun CLI — Bun's all-in-one JavaScript runtime and toolkit. Covers the CLI command reference (install, add, remove, run, build, test, x, create, init, pm, upgrade, link, unlink), bunfig.toml configuration, environment variables, the package manager and lockfile, the test runner, the bundler, the Bun runtime API (Bun.serve, Bun.file, Bun.spawn, Bun.write, hashing, transpiler), the Bun shell ($ template literal), module resolution and loaders, and globals. Triggers on: "bun", "bunx", "bun install", "bun add", "bun remove", "bun run", "bun build", "bun test", "bun x", "bun create", "bun init", "bun pm", "bun upgrade", "bun link", "bun unlink", "bunfig.toml", "bun.lock", "Bun.serve", "Bun.file", "Bun.write", "Bun.spawn", "Bun.hash", "Bun.password", "bun:test", "Bun.build", "Bun.Transpiler", "bun shell", "$ template", "import.meta", "JavaScriptCore", "Bun.serve", "HTMLRewriter", "Bun.SQL", "Bun.RedisClient", "Bun.Glob", "Bun.plugin", "bun:ffi".
Also in 3 projects that use this
xfstudioSkilltypescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling. Use PROACTIVELY for any TypeScript/JavaScript issues including complex type gymnastics, build performance, debugging, and architectural decisions. If a specialized expert is a better fit, I will recommend switching and stop.
Also in 3 projects that use this
VercelSkillgh-stack
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.
Also in 4 projects that use this
xfstudioSkilltypescript-advanced-types
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.
Also in 3 projects that use this
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/AGENTS.mdcCursor rule
- .cursor/rules/clean-code.mdcCursor rule
- .cursor/rules/codequality.mdcCursor rule
- .cursor/rules/playwright.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/test.mdcCursor rule
- llms.txtllms.txt
- agentic-ui-developmentSkill
- agentic-ui-usageSkill
- component-agentic-layoutSkill
- component-agent-run-barSkill
- component-ai-labelSkill
- component-answer-alertSkill
- component-bubbleSkill
- component-chat-boot-pageSkill
- component-chat-layoutSkill
- component-historySkill
- component-markdown-editorSkill
- component-markdown-input-fieldSkill
- component-pluginsSkill
- component-quote-backtoSkill
- component-schemaSkill
- component-sharedSkill
- component-task-listSkill
- component-thought-chainSkill
- component-tool-useSkill
- component-welcome-messageSkill
- component-workspaceSkill
- markdown-syntax-guideSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

