write-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWrite a Pull Request
编写 Pull Request
Fill . Write in Simple English. Keep the body short.
PULL_REQUEST_TEMPLATE.md填写 。使用 Simple English 写作。保持正文简短。
PULL_REQUEST_TEMPLATE.mdWhen this skill applies
此 skill 的适用场景
When you create, open, submit, or update a pull request, use this skill.
Use it for , GitHub MCP , and body edits.
Do not use a different heading set. Do not add a Summary or a Test Plan.
gh pr createcreate_pull_request创建、打开、提交或更新 Pull Request 时使用此 skill。
用于 、GitHub MCP 以及正文编辑。
不要使用其他标题集合。不要添加 Summary 或 Test Plan。
gh pr createcreate_pull_requestBefore you write
编写前
- Read the full diff against the base branch.
- Read the commit subjects on this branch.
- If linked issues or design docs add facts the diff does not show, read them.
- 阅读相对于 base branch 的完整 diff。
- 阅读此 branch 上的 commit subject。
- 如果 linked issue 或 design doc 补充了 diff 未显示的信息,请阅读它们。
Hard limits
硬性限制
Use only these headings, in this order:
- Background
- Design Decisions
- Changes
- Verification Performed
- Post-Merge Operations
Keep the whole body under 250 words.
If a heading has no content, write under it.
Do not add a sixth heading.
Do not leave HTML comments in the submitted body.
Do not add a "Made with" or "Generated with" footer.
None.仅使用以下标题,并保持此顺序:
- Background
- Design Decisions
- Changes
- Verification Performed
- Post-Merge Operations
整个正文保持在 250 个单词以内。
如果某个标题下没有内容,请在其下写入 。
不要添加第六个标题。
不要在提交的正文 中保留 HTML comments。
不要添加“Made with”或“Generated with”页脚。
None.Simple English
Simple English
Apply the skill in pragmatic mode.
If that skill is not in context, apply these rules:
simple-english- Descriptive text uses simple present or simple past.
- Descriptive sentences stay under 25 words.
- is a procedure. Use the imperative.
Post-Merge Operations - Procedural sentences stay under 20 words.
- One instruction per sentence.
- Put and
Ifat the start of the sentence.When - Use only the modals ,
can, andwill.must - Do not use ,
should,would,may, ormight.could - Do not use contractions or semicolons.
- Do not use ,
e.g., ori.e.etc. - Pick one name per thing and keep it.
- Delete filler that adds no fact.
Then run the simple-english self-check on the draft.
以务实模式应用 skill。
如果上下文中没有该 skill,请应用以下规则:
simple-english- 描述性文本使用一般现在时或一般过去时。
- 描述性句子保持在 25 个单词以内。
- 是一个操作流程。使用祈使句。
Post-Merge Operations - 操作性句子保持在 20 个单词以内。
- 每个句子只包含一条指令。
- 将 和
If放在句首。When - 仅使用 、
can和will这三个情态动词。must - 不要使用 、
should、would、may或might。could - 不要使用缩写形式或分号。
- 不要使用 、
e.g.或i.e.。etc. - 每件事只使用一个名称,并保持一致。
- 删除不提供任何事实的冗余内容。
然后对草稿运行 simple-english 自检。
Section rules
各部分规则
Background (descriptive)
Background(描述性)
State why the change exists.
Name the problem, the constraint, or the linked issue.
Use two to four sentences.
Put GitHub close keywords on their own line, for example .
Do not restate the diff.
Closes #123说明进行此变更的原因。
指出问题、限制条件或 linked issue。
使用两到四个句子。
将 GitHub close keywords 单独放在一行,例如 。
不要重复 diff 中的内容。
Closes #123Design Decisions (descriptive)
Design Decisions(描述性)
State only the choices a reviewer cannot infer from the diff.
Use a short bullet list.
If you made no such choice, write
Do not narrate the design history.
None.仅说明 reviewer 无法从 diff 中推断出的选择。
使用简短的项目符号列表。
如果未做出此类选择,请写入 。
不要叙述设计的历史。
None.Changes (descriptive)
Changes(描述性)
State what landed, at component level.
Bold the component. Then write one short clause.
Do not list files. Do not paste commit messages.
Three to seven bullets is enough.
在 component 层级说明已合入的内容。
加粗 component,然后写一个简短子句。
不要列出文件。不要粘贴 commit message。
三到七个项目符号通常足够。
Verification Performed (descriptive, simple past)
Verification Performed(描述性,使用一般过去时)
State what you ran and the result.
Name the command and the outcome.
If you did not run the test suite, say that.
Do not write an unchecked future checklist.
Do not invent runs.
说明执行了什么以及结果如何。
写出命令名称和结果。
如果未运行 test suite,请明确说明。
不要编写未勾选的未来检查清单。
不要虚构执行记录。
Post-Merge Operations (procedural)
Post-Merge Operations(操作性)
State the steps a human must do after merge.
Put a required condition before the command.
If no step is required, write
Do not tell the reader to merge the pull request.
None.说明 human 在 merge 后必须执行的步骤。
将必要条件放在命令之前。
如果不需要执行任何步骤,请写入 。
不要提示 reader 执行 Pull Request merge。
None.Title
标题
Write a conventional title of the form type-colon-what.
Keep the title under 72 characters.
Use the imperative: , , , .
AddFixPinRemove编写 形式的 conventional title。
标题保持在 72 个字符以内。
使用祈使动词:、、、。
type-colon-whatAddFixPinRemoveHow to submit
如何提交
Write the body to a file. Then pass that file to the create command.
Do not rely on GitHub to fill the template. Your replaces it.
--body先将正文写入文件。然后将该文件传给 create 命令。
不要依赖 GitHub 填充模板。 会替换模板内容。
--bodyExample
示例
Before: extra headings, a future checklist, and a generator footer.
After:
markdown
undefined**之前:**存在多余标题、未来检查清单和生成器页脚。
之后:
markdown
undefinedBackground
Background
codeql.ymldependency-review.ymlenabled:This change unblocks lane targeting in .
Tracking: lvlup-sw/.github#38.
lvlup-sw/hierophantcodeql.ymldependency-review.ymlenabled:This change unblocks lane targeting in .
Tracking: lvlup-sw/.github#38.
lvlup-sw/hierophantDesign Decisions
Design Decisions
- Add in the same shape as the other four gates.
enabled: - Use so a bad value still runs the job.
if: ${{ inputs.enabled != false }} - Leave unchanged. Consumers call it only on the default branch.
update-baseline
- Add in the same shape as the other four gates.
enabled: - Use so a bad value still runs the job.
if: ${{ inputs.enabled != false }} - Leave unchanged. Consumers call it only on the default branch.
update-baseline
Changes
Changes
- and
dependency-review.yml— acceptcodeql.yml(defaultenabled:).true - — cover both new callers.
canary-enabled-input.yml - Consumer guide — name which reusables accept the input.
- and
dependency-review.yml— acceptcodeql.yml(defaultenabled:).true - — cover both new callers.
canary-enabled-input.yml - Consumer guide — name which reusables accept the input.
Verification Performed
Verification Performed
- was clean on the three changed workflows.
actionlint - — 39 passed, 164 subtests.
pytest actions/ci-lanes/tests - The canary asserts that a skipped inner job still reports the two-part check name.
- was clean on the three changed workflows.
actionlint - — 39 passed, 164 subtests.
pytest actions/ci-lanes/tests - The canary asserts that a skipped inner job still reports the two-part check name.
Post-Merge Operations
Post-Merge Operations
None.
undefinedNone.
undefinedAnti-patterns
反模式
- Do not add extra headings such as Summary, Test Plan, Checklist, Docs, Proof, or Related Issues.
- Do not add a bullet for every file.
- Do not repeat the same fact in two sections.
- Do not name classes and methods that the diff already shows.
- Do not write unchecked boxes for work you plan to do later.
- Do not add ritual checklists.
N/A - Do not narrate the work phase by phase.
- 不要添加 Summary、Test Plan、Checklist、Docs、Proof 或 Related Issues 等额外标题。
- 不要为每个文件添加一个项目符号。
- 不要在两个部分中重复同一事实。
- 不要提及 diff 中已经展示的 class 和 method 名称。
- 不要为以后计划完成的工作添加未勾选的复选框。
- 不要添加仪式性的 检查清单。
N/A - 不要按工作阶段逐一叙述过程。