Agent审查
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 写作
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- Shell 执行
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: resolve-code-review
description: Use when a pull request has received code review comments from gemini-code-assist and you need t…
category: 写作
runtime: 无特殊运行时
---
# resolve-code-review 输出预览
## PART A: 任务判断
- 适用问题:文章、文案、发言稿、润色或结构化表达。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Usage / Process / 1. Fetch PR Comments”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于文章、文案、发言稿、润色或结构化表达,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Usage / Process / 1. Fetch PR Comments”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、执行终端命令、写入/修改文件、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、执行终端命令、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/resolve-code-review` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、执行终端命令、写入/修改文件。
先用一个小任务确认它会围绕“Usage / Process / 1. Fetch PR Comments”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: resolve-code-review
description: Use when a pull request has received code review comments from gemini-code-assist and you need t…
category: 写作
source: tomevault-io/skills-registry
---
# resolve-code-review
## 什么时候使用
- 用于提炼长内容、变更或对话里的关键信息 适合处理文章、文案、润色、翻译、总结和结构化表达,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外 A…
- 面向文章、文案、发言稿、润色或结构化表达,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Usage / Process / 1. Fetch PR Comments」组织步骤,不把推断写成作者事实。
- 读取文件、执行终端命令、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "resolve-code-review" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Usage / Process / 1. Fetch PR Comments
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、执行终端命令、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Resolve Code Review
Read code review feedback on a pull request, resolve each item, reply in comment threads, and post a summary comment. Follows the PR conventions in CLAUDE.md.
Complementary skill: superpowers:receiving-code-review — use it alongside this one to ensure technical rigor when evaluating feedback.
Usage
/resolve-code-review [PR_NUMBER]
If no PR number is provided, detect from the current branch with gh pr view --json number -q .number.
Process
digraph resolve_review {
rankdir=TB;
fetch [label="1. Fetch PR comments" shape=box];
read [label="2. Read & categorize each comment" shape=box];
fix [label="3. Implement fixes" shape=box];
reply [label="4. Reply in each comment thread" shape=box];
summary [label="5. Post summary comment" shape=box];
push [label="6. Push fixes" shape=box];
fetch -> read -> fix -> reply -> summary -> push;
}
1. Fetch PR Comments
Detect the repo owner/name from the current git remote (do not hardcode).
Permission compatibility: Always run
ghcommands as standalone statements — never chain with&&or wrap in$()variable assignments in the same Bash call. Claude Code's shell-aware permission matching evaluates each part of a chain independently, soREPO=$(gh repo view ...) && echo "$REPO"won't match aBash(gh repo view *)permission even though theghcommand itself would. Instead, run theghcommand alone and capture the tool result.
gh repo view --json nameWithOwner -q .nameWithOwner
Store the result as REPO for subsequent commands.
Fetch review context:
gh pr view <PR> --repo ${REPO} --comments
gh pr diff <PR> --repo ${REPO}
Fetch ALL inline comments with pagination (default per_page is 30 — PRs with many review rounds will have more):
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | {id, in_reply_to_id, line, path, body, created_at, pull_request_review_id, user: .user.login}]'
If the response has 100 items, there may be more pages. Use --paginate to get all:
gh api "repos/${REPO}/pulls/<PR>/comments" --paginate \
--jq '[.[] | {id, in_reply_to_id, line, path, body, created_at, pull_request_review_id, user: .user.login}]'
Find unreplied comments using two separate queries with positive-match selectors only.
zsh compatibility: Never use
!=in jq expressions passed via--jq— zsh interprets!as history expansion and the command will fail. Always use positive==selectors in separate queries instead.
# Step 1: Get all original Gemini comments (not replies)
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.in_reply_to_id == null) | select(.user.login == "gemini-code-assist[bot]") | {id, path, created_at, body_preview: (.body[0:120])}]'
# Step 2: Get IDs already replied to by dshaevel
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.in_reply_to_id > 0) | select(.user.login == "dshaevel") | .in_reply_to_id]'
# Step 3: Compare — any ID in Step 1 not in Step 2 is unreplied
To fetch the full body of specific unreplied comments by ID:
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.id == 12345 or .id == 67890) | {id, path, line, body}]'
Alternatively, fetch comments for the latest review specifically:
# Get the latest gemini review ID and summary
gh api "repos/${REPO}/pulls/<PR>/reviews" \
--jq '[.[] | select(.user.login == "gemini-code-assist[bot]")] | last | {id, body, state}'
# Fetch only that review's inline comments
REVIEW_ID=<id-from-above>
gh api "repos/${REPO}/pulls/<PR>/reviews/${REVIEW_ID}/comments" \
--jq '[.[] | {id, line, path, body, created_at}]'
If the review has a top-level summary comment (gemini-code-assist often posts one), read it first to understand the overall assessment.
2. Read and Categorize
For each review comment:
- Read the file and surrounding code to understand context before deciding
- Determine severity from the reviewer's language (critical, high, medium, low)
- Decide resolution: fix or decline
Rules:
- CRITICAL and HIGH: Must fix
- MEDIUM: Evaluate — fix if reasonable, decline with technical reasoning if not
- LOW: Fix if trivial, decline if YAGNI
3. Implement Fixes
For each item being fixed:
- Read the relevant file
- Make the change
- Commit with a descriptive message (conventional commits format)
Group related fixes into a single commit when they address the same concern.
4. Reply to Each Comment Thread
Reply in the comment thread (not top-level). Every reply MUST:
- Start with
@gemini-code-assist(required for notification) - Explain what was fixed and how (if fixed)
- Provide technical reasoning (if declining)
gh api repos/${REPO}/pulls/<PR>/comments/<COMMENT_ID>/replies \
-f body="@gemini-code-assist Fixed. Changed X to Y."
5. Post Summary Comment
After all items are resolved, post a top-level PR comment:
gh pr comment <PR> --body "$(cat <<'EOF'
@gemini-code-assist Review addressed:
| # | Feedback | Resolution |
|---|----------|------------|
| 1 | Issue X | Fixed in <commit> - Description of fix |
| 2 | Issue Y | Declined - Technical reasoning |
EOF
)"
Resolution column format: Include both the commit reference AND a brief summary.
6. Push
Push fixes to the PR branch so the reviewer can verify.
git push
Source: davidshaevel-dot-com/davidshaevel-marketplace — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核