openclaw-skills/gh-address-comments/SKILL.md
Use when addressing GitHub PR review comments or issue comments on the current branch with gh CLI, including auth checks, comment triage, edits, verification, and replies.
npx skillsauth add seaworld008/commonly-used-high-value-skills gh-address-commentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
用于快速定位当前分支对应的 GitHub Pull Request 并自动处理其中的 Review 意见或 Issue 评论。该技能通过 gh CLI 工具与 GitHub API 交互,能够读取评论、理解意图、提出修复建议并自动执行代码修改,从而显著加快代码评审的闭环速度。
# 确保已安装 GitHub CLI
brew install gh
# 登录并授权相关权限 (repo, read:org, workflow)
gh auth login
git branch --show-current。gh pr view --json number,url。gh pr view --json reviews 或运行自定义脚本 fetch_comments.py。General Comment (全局评论) 和 Inline Comment (代码行内评论),以便精准定位代码行。[编号] 评论内容 -> 拟修复逻辑。question 工具等待用户确认:“请问需要处理哪些编号的评论?”path 和 line 信息,使用 read 工具定位本地源文件。edit 或 apply_patch 进行局部替换。npm test 或 pytest 以验证正确性。git commit -m "docs/refactor: address PR review comments"。git push origin HEAD。Resolved:gh pr review --comment "Fixed as per review" <pr_id>。### PR 概览
- **PR 链接**: [https://github.com/org/repo/pull/123]
- **当前状态**: `Changes Requested`
### 待处理评论汇总 (Pending Comments)
1. **[L154, auth.py]**: "Consider using a more secure hashing algorithm."
- **拟修复**: 切换 `md5` 为 `sha256`。
2. **[L20, styles.css]**: "Hardcoded hex color should be a theme variable."
- **拟修复**: 替换 `#FFF` 为 `var(--bg-primary)`。
### 您的选择
- [ ] 全部处理
- [ ] 仅处理编号: [ ]
- [ ] 仅生成修复草案,不要执行提交
# 获取当前 PR 的所有未解决对话 (需配合 jq)
gh pr view --json reviews | jq '.reviews[].comments[] | select(.state != "RESOLVED")'
# 对特定 PR 提交修复后的 Review 回复
gh pr comment 123 --body "Addressing feedback in commit e5f2a1..."
gh-address-comments 结合 self-improving-agent 逻辑,自动提取复杂函数并尝试多种解构方案。gh 具备 write 权限。如果遇到 Forbidden 错误,需重新运行 gh auth login。git pull --rebase 以防止与他人的并行提交冲突。git status 干净,方便一键回滚。diff 展示变更内容。gh-fix-ci 进行修复。development
Enumerating failure modes via pre-mortem analysis. Systematically identifies failure scenarios for plans, designs, and features, scoring them with RPN/AP. Does not write code.
testing
Orchestrating specialist AI agent teams as a meta-coordinator. Decomposes requests into minimum viable chains, spawns each as an independent session in AUTORUN modes, and drives to final output. Use when a task spans multiple specialist domains, requires parallel agent execution, or needs hub-and-spoke routing across the skill ecosystem.
development
Converting document formats (Markdown/Word/Excel/PDF/HTML). Converts specs from Scribe and reports from Harvest into distributable formats; generates reusable conversion scripts. Use when converting documents, building accessibility-compliant PDFs, or creating Pandoc/LibreOffice pipelines.
testing
Curating cross-agent knowledge and guarding institutional memory. Extracts patterns from agent journals into METAPATTERNS.md, detects knowledge decay, propagates best practices, prevents organizational forgetting. Use when consolidating cross-agent insights, curating memory, or auditing knowledge decay.