gh-address-comments
它能做什么
这个技能帮你的 AI 智能体处理 GitHub 拉取请求上的反馈。适合希望快速、准确地处理评审者意见的开发者。
适用场景
- ✓当你想逐条处理未关闭拉取请求上的评审意见时。
- ✓当评审者留下了多条意见,你想要帮助判断应修复哪些时。
- ✓当你希望智能体为你选择的意见应用修复时。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/gh-address-comments/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示我未关闭拉取请求上的评审意见,并让我选择要修复哪些。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用 GitHub CLI 找到当前分支对应的拉取请求,并把评论和评审讨论按编号列出。然后它只为你选中的意见进行修复。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PR Comment Handler
Guide to find the open PR for the current branch and address its comments with gh CLI. Run all gh commands with elevated network access.
Prereq: ensure gh is authenticated (for example, run gh auth login once), then run gh auth status with escalated permissions (include workflow/repo scopes) so gh commands succeed. If sandboxing blocks gh auth status, rerun it with sandbox_permissions=require_escalated.
1) Inspect comments needing attention
- Run scripts/fetch_comments.py which will print out all the comments and review threads on the PR
2) Ask the user for clarification
- Number all the review threads and comments and provide a short summary of what would be required to apply a fix for it
- Ask the user which numbered comments should be addressed
3) If user chooses comments
- Apply fixes for the selected comments
Notes:
- If gh hits auth/rate issues mid-run, prompt the user to re-authenticate with
gh auth login, then retry.
常见问题
我首先需要什么?
你需要安装并登录 GitHub CLI,使用 gh auth login 登录。
它会自动修复每条意见吗?
不会。智能体会先询问你希望处理哪些编号的意见,然后才修改任何内容。
如果运行过程中登录过期怎么办?
智能体会请你用 gh auth login 重新登录,然后再重试。
详情
作者的原始描述
Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.
热度
- GitHub 星标
- 33k
- 排名
- #8759
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。