跳到正文
Skillpedia
通用编程91k · #1319

handle-pr-comments

它能做什么

这个技能引导 AI 逐条处理 GitHub 拉取请求上的审查意见。适合需要高效回应审阅者反馈的开发者。

适用场景

  • ✓当审阅者在你的拉取请求上留下了多条意见的时候。
  • ✓当你希望在修改任何代码之前,对每条意见做出决定的时候。
  • ✓当修复完成后,你希望把审查讨论串标为已解决的时候。

技能链接

https://github.com/storybookjs/storybook/blob/next/.agents/skills/handle-pr-comments/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我查看拉取请求中未解决的审查意见,并逐条询问我该如何处理。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 列出未解决的意见,阅读每条意见周围的代码,并建议修复方案。它应用你选择的方案,提议提交,并把讨论串标记为已解决。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Handle PR Comments

Evaluate review comments on the PR (from the current branch, or a PR number/URL if given). For each unresolved comment: summarize the feedback, suggest a resolution, ask the user how to resolve it, apply their choice, commit if needed, and resolve the thread.

  1. Find the PR. Use the given number/URL, else derive it from the current branch (gh pr view). Stop if no PR exists.

  2. Fetch unresolved review threads via the GraphQL reviewThreads field on the pull request — request each thread's id, isResolved, isOutdated, path, line, and comments. Filter to isResolved == false. (Use GraphQL, not REST: only it exposes thread ids and resolution state.)

  3. Loop one comment at a time. For each: (a) summarize the feedback + file/line, reading surrounding code; (b) suggest a concrete fix; (c) ask via AskQuestion with options — apply suggested fix / apply a different fix / reply only / skip; (d) apply the choice; (e) if applicable, summarize what was changed and ask whether to commit; (f) resolve the thread via the GraphQL resolveReviewThread mutation.

  4. Report an overview of what was changed, committed, replied to, skipped, and resolved. Include links.

Notes

  • Handle real-user comments before addressing AI agents' (Copilot, CodeRabbit).
  • Group duplicate comments; when the same/similar issue is mentioned multiple times, handle them all at once.
  • Make a separate commit for each change.
常见问题

它会不经询问就修复每一条意见吗?

不会。该技能会请你为每条意见选择:应用修复、修改,还是跳过。

AI 审阅者的意见如何处理?

该技能说明,应先处理真人审阅者的意见,再处理 AI 审阅者的意见。

必须已经存在拉取请求吗?

是的。它会查找当前分支对应的拉取请求,或你给出的编号。

详情

作者的原始描述

Triage and resolve GitHub PR review comments one by one, interactively. Use when the user asks to handle, address, respond to, or resolve PR review comments, or mentions reviewer feedback on a pull request.

repo: storybookjs/storybook

热度

GitHub 星标
91k
排名
#1319
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能