github-pr-comments
它能做什么
这项技能获取拉取请求上的行内审查评论及其代码上下文,然后逐一应用每项要求的修改。适合需要快速回应审查反馈的开发者。
适用场景
- ✓当审阅者在你的拉取请求上留下了多条行内评论的时候。
- ✓当某条评论包含你希望准确应用的修改建议的时候。
- ✓当你希望确保没有遗漏任何审查评论的时候。
技能链接
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/github-pr-comments/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能查看我拉取请求上的审查评论,并按它们的要求进行修改吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体运行一个脚本,列出每一条行内评论及其代码。它为每条评论创建一项任务,应用修改,然后运行项目的检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Resolve Code Review Comments
1. Fetch all comments
Run the bundled script to get every inline comment with its diff hunk:
bash .forge/skills/resolve-code/scripts/pr-comments.sh [PR_NUMBER]
Omit PR_NUMBER to use the current branch's PR.
Each block in the output contains:
File :— file path and line number-- code context --— the diff hunk showing surrounding lines-- comment --— the reviewer's message
2. Create a todo item per comment
Add one todo for each comment before touching any code. This ensures nothing is missed even when comments span many files.
3. Apply each comment
Work through todos one at a time. There are two comment types:
Suggestion block
Body starts with ```suggestion. Apply the suggested text verbatim as a
replacement for the highlighted lines in the diff hunk.
Free-form feedback
Read the comment in the context of the diff hunk, infer the required change, and implement it. When the intent is ambiguous, make the change that best matches the project's conventions and state the assumption clearly.
4. Verify
After all comments are addressed, run:
cargo check && cargo nextest run
Fix any errors before marking the task complete.
常见问题
如果某条评论不清楚怎么办?
智能体会做出最符合项目的修改,并说明它所做的假设。
它需要特定的工具吗?
它使用 GitHub 命令行工具和项目自己的检查命令。
它能处理涉及多个文件的评论吗?
可以。任务列表由每一条评论生成,即使评论分布在多个文件中。
详情
作者的原始描述
Resolve inline code review comments on a GitHub PR. Use when asked to "resolve review comments", "address PR feedback", "fix PR comments", or "work through review comments". Fetches every inline comment with its surrounding code context, then applies each change systematically.
repo: tailcallhq/forgecode
热度
- GitHub 星标
- 7.6k
- 排名
- #13112
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
create-agent
7.6k教你的智能体为 Forge 编程应用创建或修改自定义智能体,这些智能体以 markdown 文件保存,顶部为设置。
create-command
7.6k教你的智能体为 Forge 编程应用创建可复用的命令,以按顺序执行的 markdown 步骤编写。
create-github-issue
7.6k帮你的智能体提交一个遵循代码仓库自身议题模板的 GitHub 议题,并填写正确的字段和标签。
create-plan
7.6k帮你的智能体在修改任何代码之前,为一项复杂任务编写详细的实施计划,包括步骤、风险和备选方案。