From kk-common-plugin
Fetches all unresolved review comments from a GitHub PR, determines whether each one points to a real code problem, fixes genuine issues directly in the codebase, and outputs a Markdown table report. Use this skill whenever the user mentions reviewing PR comments, resolving review feedback, handling code review suggestions, acting on PR threads, or cleaning up review comments — even if they don't say 'pr-review-resolver' explicitly. Also trigger when the user says things like '帮我处理PR里的评论', '解决PR反馈', '把评论修掉', or similar.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kk-common-plugin:pr-review-resolverThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review all unresolved comment threads in a GitHub PR, decide which ones represent real problems, fix the real ones, and produce a clear summary table.
Review all unresolved comment threads in a GitHub PR, decide which ones represent real problems, fix the real ones, and produce a clear summary table.
Check the user's message for a PR number (e.g. #42, PR 42, pull/42). If none is given, derive it from the current git branch:
gh pr view --json number -q .number
Get the repo identity:
gh repo view --json nameWithOwner -q .nameWithOwner
# → "owner/repo"
Use GraphQL to get all review threads where isResolved is false. Include the diff hunk for context.
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
title
headRefName
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
comments(first: 10) {
nodes {
author { login }
body
path
line
originalLine
diffHunk
createdAt
}
}
}
}
}
}
}' -F owner=OWNER -F repo=REPO -F pr=NUMBER
Filter to threads where isResolved == false. If there are zero unresolved threads, tell the user and stop.
For every unresolved thread, read the actual source file to understand current code state:
# Read the file at the relevant path
Then make a judgment call: is this a real problem that still exists?
isOutdated: true (code has changed and the concern no longer applies)When in doubt, lean toward fixing rather than ignoring — it's better to make a harmless improvement than to silently discard a real concern.
For each thread judged as a real problem:
Apply fixes one at a time. If a fix is ambiguous or risky (e.g. architectural change, requires clarification), mark it as 需确认 in the report and describe what's needed instead of guessing.
After processing all threads, output this Markdown table. Use 简体中文 for all content except code identifiers and file paths.
## PR #{number} 评论处理报告
| # | 评论作者 | 文件位置 | 评论摘要 | 结果 | 处理说明 |
|---|---------|---------|---------|------|---------|
| 1 | @alice | `src/Foo.swift:42` | 强制解包存在崩溃风险 | ✅ 已修复 | 将 `!` 改为 guard let,添加安全解包 |
| 2 | @bob | `src/Bar.swift:17` | 建议重命名变量 | ⏭ 已忽略 | 仅为命名偏好,无项目规范要求 |
| 3 | @carol | `src/Baz.swift:88` | 缺少错误处理 | ⚠️ 需确认 | 涉及架构决策,需与作者确认处理方式 |
Result icons:
✅ 已修复 — problem was real, fix applied⏭ 已忽略 — not a real problem, no action taken⚠️ 需确认 — real concern but fix requires human decisionAfter the table, add a one-line summary:
共处理 N 条未解决评论:X 条已修复,Y 条已忽略,Z 条需确认。
⚠️ 需确认 with note that the file path couldn't be resolved.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub twofiveoneten/kccpluginmarket --plugin kk-life-tool