360 Secure SkillHub
360 安全技能中心

Gh Address Comments

面向 GitHub PR 评审评论处理:先确认 gh CLI 已认证,运行 scripts/fetch_comments.py 打印当前分支开放 PR 的评论与评审线程,按编号给出简短修改说明,再按用户选择应用代码修复;若遇认证或限流问题会提示重新认证。

tbeard602
tbeard602
热度 16.02
最近更新 2026-06-07 21:55:28
分类:开发依赖:代码执行 / 第三方 API / 读写文件应用场景:代码审查 / 代码生成 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gh-address-comments
Metadata
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.