一键导入
fix-pr-comments
Evaluate and fix unresolved review comments for a PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Evaluate and fix unresolved review comments for a PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Convert conversation context into atomic PKM artifacts (.ref.md, .synth.md, .temp.md) with compound extensions and frontmatter. Use when the user asks to capture findings, save research, or create knowledge base entries.
Nurture intuitions into defined problems and evaluate approaches through dialogue.
Reference material for producing epistemically classified PKM artifacts during research. Covers epistemic classification, PKM schema, behavioral guidance, and qmd duplicate checking.
Execute tk tickets interactively with human approval gates. Dispatches subagents per task, presents results for review.
Review abandoned and in-progress tk tickets with timestamps and ralph logs. Use to audit stalled work and decide what to do about it.
Convert a plan file into actionable tk tickets with dependencies. Researches the codebase to vet the plan, decomposes into tickets, verifies the decomposition, and creates tickets in tk.
| name | fix-pr-comments |
| description | Evaluate and fix unresolved review comments for a PR |
| disable-model-invocation | true |
| allowed-tools | Bash(gh *), Bash(jq *), Bash(cat *), Read, Edit, Write |
Fetch the unresolved review threads on the current PR (or one the user names) and, for each, verify against the actual code whether the reviewer's claim is accurate, what change is being requested, and whether it's worth making — surfacing cases where the PR author already pushed back, the comment is on stale code, or the reviewer is wrong.
Present that assessment so the user can pick which to address. Then make only the minimal change each chosen comment asks for, one at a time, without resolving threads or committing.
The goal is to shift verification cost off the user: they review your recommendations and the resulting diff, not the reviewer comments themselves.
If the user supplied owner/repo#N, pass --repo owner/repo to every gh command.
Otherwise detect the PR for the current branch:
gh pr view --json number,url,headRefName,baseRefName,author
Capture author.login — you'll use it for pushback detection in step 3.
If no PR exists for the current branch, stop and tell the user.
Cross-repo PRs: if the PR's repo doesn't match the current working directory, check ~/Documents/projects/ for a clone on the PR's branch and work from there. If no local checkout exists, tell the user where to clone or which directory to switch to — do not try to verify comments against the wrong repo.
Write this query to $TMPDIR/pr_query.graphql using the Write tool (bash heredocs mangle ! in GraphQL type markers):
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
comments(first: 20) {
nodes {
author { login }
body
path
line
startLine
originalLine
diffHunk
}
}
}
}
}
}
}
Execute and filter to unresolved in one pipeline:
gh api graphql \
-F owner='{owner}' \
-F repo='{repo}' \
-F pr={number} \
-f query="$(cat $TMPDIR/pr_query.graphql)" \
2>/dev/null | jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]' > $TMPDIR/pr-{number}-unresolved.json
If there are no unresolved threads, report that and stop.
Apply the epistemic-classification skill to this step — every claim in the assessment must be labeled Verified, Inferred, or Guess. The user is going to skim; labels are what make spot-checking cheap.
For every unresolved thread, determine:
file:line.isOutdated: true, or line is null while originalLine is set, the diff has moved past the cited location. Flag it — the code under discussion may no longer exist.```suggestion block, note it — the requested change is literally that block's contents.## Unresolved comments (N total)
1. **file.ts:42** — @reviewer: "quoted or summarized comment"
- Interpretation: [one sentence]
- Accuracy: [V|I|G] [finding, citing file:line]
- Flags: [stale | author-pushback | reviewer-wrong | suggestion-block | none]
- Recommendation: [apply | skip] — [one-sentence reason]
2. ...
## Not checked
- [anything you couldn't verify, and why]
Then wait. The user picks which to apply (all / specific numbers / none).
For each comment the user picks:
Rules:
```suggestion block, apply that block verbatim unless you have a verified reason not to.gh, never WebFetch for GitHub URLs. Enterprise GitHub blocks unauthenticated requests; gh is always authenticated.-F query=... mangle ! in type markers (Int!, String!). Write the query to a file with the Write tool and pass it via -f query="$(cat ...)".jq in the same command — don't write the full GraphQL response to disk. Threads with long histories balloon fast.pr-{number}-unresolved.json so concurrent runs against different PRs don't clobber each other.