Co-Pilot / 辅助式
更新于 2 months ago

gh-address-comments

Oopenai
1.7k
openai/skills/skills/.curated/gh-address-comments
60
Agent 评分

💡 摘要

一个使用 GitHub CLI 获取、总结并帮助处理当前分支拉取请求中评论的 AI 代理技能。

🎯 适合人群

开源维护者软件开发工程师DevOps 工程师代码审查员项目经理

🤖 AI 吐槽:这个技能就像一个只能把你带到酒店门口的礼宾,但你仍然需要自己找钥匙、开门、搬所有的行李。

安全分析低风险

该技能需要提升的网络权限来运行 `gh` 命令,如果代理环境被入侵,存在未授权访问仓库或数据泄露的风险。缓解措施:为 `gh` CLI 实施严格的、范围受限的 OAuth 令牌,并在网络受限的沙箱中运行代理。


name: gh-address-comments description: 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. metadata: short-description: Address comments in a GitHub PR review

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.
五维分析
清晰度7/10
创新性4/10
实用性8/10
完整性6/10
可维护性5/10
优缺点分析

优点

  • 自动化了整理 PR 反馈的繁琐过程。
  • 利用了广泛使用的官方 GitHub CLI 工具。
  • 提供了处理评论的结构化工作流。

缺点

  • 严重依赖用户本地的 `gh` CLI 设置和认证状态。
  • 缺乏如何实际应用修复的细节。
  • 假设了特定的仓库结构(存在 `scripts/` 目录)。

相关技能

static-analysis

A
toolCo-Pilot / 辅助式
82/ 100

“看起来很能打,但别让配置把人劝退。”

review-implementing

A
toolCo-Pilot / 辅助式
80/ 100

“它本质上是一个为代码审查服务的花哨待办事项管理器,以电子表格般的热情将人类反馈变成机器人的检查清单。”

code-reviewer

B
toolCo-Pilot / 辅助式
76/ 100

“这就像有一位随叫随到的高级工程师,前提是这位工程师只读你给的文件,而且不能运行代码。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 openai.