jackin-create-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejackin-create-pr
jackin-create-pr
Open a PR for a small fix in the jackin❯ repo — typo, dependency bump, one-line bugfix, doc tweak — that needs no roadmap item. Also the shared PR-mechanics path other skills reuse. Commits inline; no separate commit skill.
jackin❯ rule files auto-load — , agent rules, , . This skill sequences them, never restates them. Read them for full rules.
PULL_REQUESTS.md.github/BRANCHING.mdCOMMITS.md为jackin❯仓库中的小型修复创建PR——如错别字修正、依赖版本更新、单行bug修复、文档调整等——无需纳入路线图事项。这也是其他技能可复用的通用PR流程。变更直接提交,无需单独的提交技能。
jackin❯规则文件会自动加载——、下的Agent规则、、。本技能会按顺序执行这些规则,不会重复说明。如需完整规则,请阅读上述文件。
PULL_REQUESTS.md.github/BRANCHING.mdCOMMITS.mdWhen to use
使用场景
- Operator runs .
jackin-create-pr - Small, self-contained change (no design, no roadmap item).
- 操作人员执行命令。
jackin-create-pr - 小型、独立的变更(无需设计,无需纳入路线图事项)。
When NOT to use
禁用场景
- Feature/idea worth a roadmap item → .
jackin-propose - Implementing a finalized roadmap item → .
/goal Implement <slug>.md
- 值得纳入路线图的功能/想法 → 使用。
jackin-propose - 实现已确定的路线图事项 → 使用。
/goal Implement <slug>.md
Arguments
参数
- — explicit branch name.
--branch <name> - — pick the branch name yourself, no confirmation.
--auto-branch - — commit + PR title (else derive from the diff, Conventional Commits).
--title <msg>
- — 指定分支名称。
--branch <name> - — 自动选择分支名称,无需确认。
--auto-branch - — 提交记录及PR标题(若未指定,则从差异内容中推导,遵循Conventional Commits规范)。
--title <msg>
Process
流程
- Branch. Never commit to . If on
main, create amain/fix//chore//docs/-prefixed branch named from the change. Suggest and confirm unlessrefactor/or--auto-branchgiven.--branch - Commit. Uncommitted changes → commit inline per : Conventional Commits subject, DCO sign-off (
COMMITS.md). Already committed → skip. Thengit commit -s.git push - Build the body. Run
[bin]. The classified change digest (rust / docs / capsule / schema + file list) prints to stderr — read it; the body skeleton goes to the file: the PR template (read fromcargo xtask pr body --base origin/main > /tmp/pr-body.mdat runtime) with the verify-locally blocks already selected and byte-exact, prose left as placeholders. Block selection: Checkout + isolation env always; Rust tests on a Rust change; Docs checks + walk on.github/PULL_REQUEST_TEMPLATE.md; jackin-capsule smoke (withdocs/**before any--capsule/console) onload; schema migration smoke on a versioned-schema touch.crates/jackin-capsule/ - Fill + create. Edit
[agent]— write the prose sections (Summary, What ships, Behavior changes) from the digest + diff; drop the optional sections you do not need. Then/tmp/pr-body.md. The binary already wrote the body, so there is no heredoc to quote.gh pr create --body-file /tmp/pr-body.md - Verify render. — confirm the prose you added renders (no stray
gh pr view <PR> --json body -q .body$\`` orgh pr edit --body-file` if needed.from hand-editing). Fix with - Reply. Share the PR URL and repeat the Verify-locally commands in your final message.
- 创建分支。绝对不要直接提交到分支。若当前处于
main分支,需创建以main/fix//chore//docs/为前缀的分支,分支名称与变更内容相关。除非指定了refactor/或--auto-branch,否则需先建议分支名称并确认。--branch - 提交变更。若存在未提交的变更 → 按照的规范直接提交:遵循Conventional Commits主题格式,添加DCO签名(使用
COMMITS.md命令)。若已提交变更 → 跳过此步骤。然后执行git commit -s。git push - 生成正文骨架。执行
[bin]。分类后的变更摘要(rust / 文档 / capsule / 架构 + 文件列表)会输出到stderr——请查看该摘要;正文骨架会写入文件:PR模板(运行时从cargo xtask pr body --base origin/main > /tmp/pr-body.md读取)已自动预选本地验证模块,内容完全匹配,仅留 prose 部分作为占位符。模块选择规则:始终包含检出+隔离环境;若为Rust变更,则包含Rust测试;若涉及.github/PULL_REQUEST_TEMPLATE.md目录,则包含文档检查+预览;若涉及docs/**目录,则包含jackin-capsule冒烟测试(需在crates/jackin-capsule//console之前添加load参数);若涉及版本化架构修改,则包含架构迁移冒烟测试。--capsule - 填充内容并创建PR。编辑
[agent]——根据变更摘要和差异内容填写prose部分(摘要、交付内容、行为变更);删除不需要的可选部分。然后执行/tmp/pr-body.md。二进制文件已生成正文,无需处理 heredoc 引用问题。gh pr create --body-file /tmp/pr-body.md - 验证渲染效果。执行——确认添加的prose内容渲染正常(无手动编辑导致的多余
gh pr view <PR> --json body -q .body$\``或gh pr edit --body-file`命令修复。符号)。如有问题,使用 - 回复通知。分享PR链接,并在最终消息中重复本地验证命令。
Common mistakes
常见错误
- Committing to instead of a branch.
main - Hand-building the body or template instead of — it reads the template and selects the verify blocks for you.
cargo xtask pr body - Posting the skeleton with the prose placeholders left unfilled.
- Deployed docs URLs in the body (break post-merge) — refer to docs by name.
- 直接提交到分支而非创建新分支。
main - 手动编写正文或模板,而非使用——该命令会读取模板并根据差异自动选择验证模块。
cargo xtask pr body - 提交保留prose占位符的骨架内容。
- 正文中使用已部署的文档URL(合并后会失效)——应通过文档名称引用。
Tooling
工具支持
cargo xtask pr bodyproposecargo xtask pr bodypropose