跳到正文
Skillpedia
通用编程7.6k · #13112

github-pr-comments

它能做什么

这项技能获取拉取请求上的行内审查评论及其代码上下文,然后逐一应用每项要求的修改。适合需要快速回应审查反馈的开发者。

适用场景

  • ✓当审阅者在你的拉取请求上留下了多条行内评论的时候。
  • ✓当某条评论包含你希望准确应用的修改建议的时候。
  • ✓当你希望确保没有遗漏任何审查评论的时候。

技能链接

https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/github-pr-comments/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/github-pr-comments/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能