pull-requests
它能做什么
这份指南规定了如何用简明、易读的文字,并采用清晰的结构撰写拉取请求描述。适合经常提交拉取请求,并希望审阅者快速理解的开发者。
适用场景
- ✓当你请智能体撰写或编辑拉取请求描述时。
- ✓当你希望为没有编写代码的审阅者解释一次合并请求时。
- ✓当你需要说明他人如何自行验证一项修改时。
技能链接
https://github.com/cloudflare/computer/blob/main/.agents/skills/pull-requests/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为这些修改撰写拉取请求描述,包括我如何在本地进行测试。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能规定了结构:问题、解决方案、如何验证修改、测试方法以及文档改动。它更推崇简短段落、示例和图表,而不是冗长的列表。它不适用于提交信息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Pull Request + Merge Request Style Guide
Overview
A good pull request description is a Markdown document that tells the story of the accompanying git diff. It is intended for human consumption and should use plain language, read clearly and be easy to follow.
When to Use
Use this skill any time you are tasked with creating a pull request on GitHub. The output will be a markdown document that follows the style guide and meets the accompanying verification.
Structure
A good pull request tells the story of the change and is intended to add color and context that is not or cannot be conveyed in the source code.
It should aim to be concise and use paragraphs and prose where appropriate rather than bullet points to improve readability and tell the story. Bullet points can be used for lists when semantically appropriate.
Code examples and diagrams (using mermaid) are preferred over prose to communicate your message.
It should use the following structure and include a paragraph on each topic.
- Detail the problem the change is solving. Reference issues, PRs or documents if relevant.
- Explain the solution and how it solves the problem.
- Explain how the reader can manually verify the change. e.g. give a code example or a command to run locally.
- Document the testing strategy when applicable.
- Document any changes to documentation or READMEs that cover the changes.
- Document any follow up code changes required.
Any sections that are not relevant should be omitted.
Style guide
It is important to follow these rules when writing a pull request description.
At all times keep the use of language simple. Use plain English
Good: Clear
We've updated the
readFile()method to support streaming data so that the caller can read a file without buffering content into memory.
Bad: Verbose and technical jargon
The
readFile()function has an overload that when used returns aReadableStream()object that emits chunks ofUInt8Arraytype that can be used by the caller to stream bytes instead of base64 strings which are held in memory.
Avoid technical terms or jargon
Good:
The daemon now flushes pending writes before it tears down the mount.
Bad:
The daemon now performs a synchronous fsync barrier against the underlying inode cache before invoking the FUSE unmount ioctl.
Never use acronyms, always use the full word unless it's extremely common like API, RPC or HTTP
Good:
We've updated the durable object (DO) to use RPC to reduce the time-to-first-byte (TTFB)
Bad:
We've updated the DO to use RPC to reduce TTFB.
Keep it high level
Describe what the code cannot. Architecture, design decisions, important trade-offs are the important details. Do not attempt to describe what the code is doing, the code itself can do that.
Good:
This change extends the same call site to accept a name option. When set, the SDK provisions a named Cloudflare Tunnel under a zone the user controls and binds <name>.<zone> to the local port. Quick and named tunnels share the same entry point, the same TunnelInfo shape (now a discriminated union keyed on name), and the same destroy() semantics
Bad:
This change extends
tunnels.tsto update theget()method to accept a name option{ name: "bill" }. When set, the SDK provisions a named Cloudflare Tunnel viacloudflaredrunning viaBun.spawn()under a zone the user controls and binds <name>.<zone> to the local port. Quick and named tunnels share the same entry pointsandbox.tunnels, the sameTunnelInfoshape (now a discriminated union keyed on nameNamedTunnelInfo | QuickTunnelInfo), and the same destroy() semantics.
Use American English spelling at all times
e.g. color instead of colour.
Never refer to agent conversations or chat history when writing plans, documentation or commit/pull requests
Good:
Further work will be required to update the remaining file methods to support streaming data.
Bad:
Streaming in
writeFile()will be implemented as part of the P2 plan to update the remaining methods.
Never reference local files or documents that are not contained within the commit history in the repository
Good:
Further work will be required to update the remaining file methods to support streaming data.
Bad:
The plan for the
writeFile()changes as detailed in P2 in PLAN.md
Markdown
Format the pull request using Github flavored
常见问题
它也涵盖提交信息吗?
不涵盖。指南说明它不适用于提交信息。
每个部分都必须是段落吗?
指南要求每个主题写一段,只在适合的地方使用列表。
它会建议使用图表吗?
会。当代码示例和图表比文字更能说明问题时,会优先使用它们。
详情
作者的原始描述
Describes how to write pull/merge requests. Use when asked to write or edit a pull request or merge request description. This skill is not relevant to commit messages.
repo: cloudflare/computer
热度
- GitHub 星标
- 9.8k
- 排名
- #12207
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
cloudflare
9.8k在开始工作前,指引你的智能体查阅 Workers、Durable Objects、wrangler 及其他服务对应的 Cloudflare 平台指南。
prose
9.8k教你的智能体用简明易懂的英文撰写代码注释、提交信息、README 和文档,避免行话、缩写和官腔。
test-driven-development
9.8k教你的智能体在修改代码前先写一个会失败的测试,并先用测试复现缺陷。帮助证明修改确实有效。
gardener-tasks
9.8k讲解如何编写和检查 Gardener 任务文件,它通过 GitHub Actions 运行 AI 维护作业,并限制每个作业的修改范围。