create-fix-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate a fix PR
创建修复PR
Overview
概述
You are investigating a problem and filing a pull request that resolves it. This builds on the skill — do the investigation properly first, don't jump to a fix without evidence.
investigateUse the CLI for all GitHub operations (auth comes from your login) and standard / / / for everything else.
ghghBashEditReadGrep你正在调查一个问题并提交解决该问题的拉取请求(PR)。这建立在技能的基础上——首先要妥善完成调查,不要在没有证据的情况下直接进行修复。
investigate所有GitHub操作使用 CLI(身份验证来自你的登录信息),其他操作使用标准的 / / / 工具。
ghghBashEditReadGrepWorkflow
工作流程
- Investigate. Use the skill to find the root cause. Cite the exact trace ID, log line, error group, and code location that pins the problem.
investigate - Confirm there isn't already a PR open. Before filing anything, search GitHub for an existing open PR addressing the same issue — . If one exists, direct the user to it — do not create a duplicate.
gh pr list --search "<keywords>" --state open - Judge whether a PR is the right tool. If the fix requires a config change, a flag flip, or a change outside the code you can access, describe the solution instead of filing a PR.
- Get the repo. Clone it if you don't already have it locally — .
gh repo clone <owner>/<repo> - Check for repo conventions. Read or
agents.mdat the repo root — these describe repo-specific rules your fix needs to respect.CLAUDE.md - Make the change. Minimal diff. Don't refactor surrounding code, don't add features, don't fix unrelated bugs you happen to notice. One PR, one fix.
- Set git identity before committing — see .
pr-conventions.md - Commit, push, and file the PR. See for branch naming and PR body rules.
pr-conventions.md
- 调查:使用技能找到问题根源。引用确切的跟踪ID、日志行、错误组和定位问题的代码位置。
investigate - 确认没有已开启的PR:在提交任何内容之前,在GitHub上搜索是否已有针对同一问题的开放PR——执行。如果存在,引导用户查看该PR,不要创建重复内容。
gh pr list --search "<关键词>" --state open - 判断PR是否为合适工具:如果修复需要修改配置、切换标志或更改你无法访问的代码,请描述解决方案而非提交PR。
- 获取仓库:如果本地没有该仓库,克隆它——执行。
gh repo clone <owner>/<repo> - 查看仓库约定:阅读仓库根目录下的或
agents.md——这些文件描述了你的修复需要遵守的仓库特定规则。CLAUDE.md - 进行修改:最小化差异。不要重构周边代码,不要添加功能,不要修复你偶然发现的无关bug。一个PR只解决一个问题。
- 提交前设置git身份——参考。
pr-conventions.md - 提交、推送并创建PR:分支命名和PR正文规则参考。
pr-conventions.md
What's a good fix
什么是优质修复
- Changes the smallest possible number of lines
- Preserves current production behavior unless the bug IS the current behavior
- Doesn't depend on assumptions you can't verify from the evidence
- Would pass a skill's check if one existed
code-review
- 修改尽可能少的代码行数
- 保留当前生产环境行为,除非该行为本身就是bug
- 不依赖无法从证据中验证的假设
- 若存在技能,需能通过其检查
code-review
What isn't
什么不是优质修复
- Sweeping refactors unrelated to the reported problem
- Speculative null checks or error handling added "while you're in there"
- Changes to tests that hide the underlying bug
- Bumping dependency versions to fix a symptom
- 与报告问题无关的大规模重构
- 额外添加的推测性空值检查或错误处理(“顺便处理”)
- 修改测试以掩盖潜在bug
- 升级依赖版本以解决表面症状
Restricted tools
受限工具
If isn't installed or shows no auth, surface the error to the user and stop — don't try alternative auth schemes.
ghgh auth status如果未安装或显示未验证身份,请向用户反馈错误并停止操作——不要尝试其他身份验证方案。
ghgh auth statusNever include in a PR
PR中绝对不能包含的内容
- GitHub access tokens or any other secrets or credentials.
- Debugging logs or print statements you added during investigation.
Follow the repo's own commit and PR conventions for everything else.
- GitHub访问令牌或任何其他机密凭证。
- 调查过程中添加的调试日志或打印语句。
其他所有事项请遵循仓库自身的提交和PR约定。