fusion-github-review-resolution
equinor/fusion-skills
미해결된 GitHub PR 검토 스레드를 처음부터 끝까지 해결합니다: 각 검토 댓글이 올바른지 평가하고, 타당한 경우 해당 부분을 수정하며, 그렇지 않은 경우 그 이유를 설명하여 답변한 뒤, 커밋하고 스레드를 해결합니다. 사용 대상: 미해결 검토 스레드, PR 검토 피드백, 변경 요청이 있는 PR, PR 검토 URL(#pullrequestreview-...), 검토 코멘트 수정, 진행 중인 스레드 종료, PR 피드백 처리. 사용하지 말아야 할 경우: 코드 변경 없이 피드백 요약하기, 새로운 PR 생성, 읽기 전용 브랜치.
...모든 것을 확장하십시오fusion-github-review-resolution에 대하여
이 실험용 스킬은 해결되지 않은 GitHub 풀 리퀘스트 검토 스레드를 처음부터 끝까지 해결하기 위한, 반복 가능하고 추적 가능한 워크플로를 제공합니다. 이 스킬은 각 리뷰 댓글에 대해 피드백이 실제로 올바른지 평가하고, 타당한 경우 해당 부분에 대한 코드 수정 사항을 적용하며, 그렇지 않은 경우 그 이유를 설명하는 답글을 남긴 뒤, 변경 사항을 커밋하고 스레드를 해결함으로써, 산발적으로 남는 ‘변경 요청’ 피드백을 결정론적인 종결 프로세스로 전환합니다. 이 스킬은 담당자가 GitHub 변경 작업과 코드 수정을 번갈아 수행하다가 어떤 스레드가 처리되었는지 추적하지 못해 발생하는, 오류가 발생하기 쉬운 비체계적인 검토 수정 문제를 해결합니다.
이 스킬은 엄격한 단계 순서(페치, 분석, 수정, 검증, 푸시, 답변, 해결, 확인)를 준수하며, 검토 URL에서 소유자/리포지토리/PR/검토 ID를 자동으로 추출하고, 작업 체크리스트 문서를 사용하여 각 스레드를 추적합니다. 이 스킬은 가능한 경우 GitHub MCP 서버의 구조화된 리뷰 스레드 도구를 우선적으로 사용하며, 그렇지 않은 경우 리뷰 ID 범위 내 수집 및 ‘dry-run-first’ 해결을 지원하는 작업별 번들 GraphQL 자산이나 `gh` 기반 셸 헬퍼 스크립트(get-review-comments.sh 및 resolve-review-comments.sh)로 대체합니다. 이 도구는 GraphQL 비용 관리 기능(변경 요청 속도 조절, retry-after 헤더 준수, 중복 응답 방지 등)을 포함하며, 커밋, 유효성 검사 및 PR 정책은 리포지토리별 지침에 따르도록 합니다.
대상 사용자는 PR 리뷰 피드백을 자동화되고 통제된 방식으로 처리하고자 하는 엔지니어링 팀(Equinor의 Fusion Core 그룹에서 시작됨)입니다. 이 스킬은 코드 커밋, 브랜치 푸시, 답글 게시, 스레드 해결과 같은 쓰기 작업을 수행하지만, 공식 GitHub 툴과 git을 통해 이루어지며, 브랜치/워크트리 확인, 유효성 검사 명령, 그리고 피드백을 맹목적으로 적용하기보다 그 정확성을 판단하는 규칙에 의해 제어됩니다. 파괴적이거나 정보를 유출하는 행동은 없으며, 위험 프로필은 표준 인증 리포지토리 자동화와 동일합니다.
자주 묻는 질문
이 스킬을 실행하려면 무엇이 필요합니까?
호환성 메타데이터에 따라 GitHub MCP 서버 또는 gh CLI와 git이 필요합니다. 구조화된 리뷰 스레드 MCP 도구를 우선적으로 사용하며, 그렇지 않을 경우 번들된 GraphQL 자산이나 gh 기반 셸 헬퍼를 대체로 사용합니다.
코드를 푸시하고 스레드를 자동으로 해결합니까?
예, 관리되는 워크플로우 내에서 가능합니다. 이 스킬은 고정된 ‘페치-검증(fetch-to-verify)’ 단계 순서에 따라 대상에 맞는 수정 사항을 적용하고, 커밋 및 푸시를 수행하며, 근거를 제시하며 답글을 달고, 스레드를 해결합니다. 먼저 브랜치/워크트리 컨텍스트를 확인한 후, 커밋, 유효성 검사 및 PR 규칙을 리포지토리 로컬 정책에 따르도록 처리합니다.
모든 리뷰 코멘트를 무분별하게 적용하나요?
아니요. 핵심 규칙은 각 코멘트가 실제로 올바른지 판단하고, 피드백이 타당할 때만 수정 사항을 적용하며, 동의하지 않을 때는 근거를 제시하여 답장하고, 코멘트가 모호할 때는 사용자에게 확인을 요청해야 한다는 것입니다.
언제 이 기능을 사용하지 말아야 할까요?
해결되지 않은 리뷰 코멘트가 없는 경우, 코드 변경 없이 피드백만 요약하고 싶은 경우, 스레드가 이미 해결된 경우, 또는 브랜치/워크트리가 의도적으로 읽기 전용으로 설정된 경우에는 이 기능을 사용하지 마십시오.
GitHub 속도 제한에 걸리지 않도록 하려면 어떻게 해야 하나요?
이 도구는 GraphQL 비용 관리 기능을 포함하고 있습니다. 즉, 뮤테이션(mutation) 및 쿼리(query)별 포인트 비용을 기록하고, 연속된 뮤테이션 사이에 최소 1초간 일시 중지하며, 'retry-after' 헤더를 준수하고, 인증된 사용자의 중복 응답으로부터 resolve 스크립트를 보호합니다.
모든 파일
10개 파일assets/add-pull-request-review-thread-reply.graphql0.2 KB보기assets/resolve-review-thread.graphql0.2 KB보기CHANGELOG.md5.6 KB보기SKILL.md14.4 KB보기assets/pull-request-reviews.graphql0.3 KB보기assets/unresolved-thread-count-for-review.graphql0.4 KB보기scripts/resolve-review-comments.sh 11.8 KB 보기 assets/pull-request-review-threads.graphql 0.7 KB 보기 assets/review-resolution-checklist.md 2.8 KB 보기 scripts/get-review-comments.sh 5.5 KB 보기When to use
Use this skill when a pull request has unresolved inline review comments and you need a repeatable, auditable closure workflow.
Typical triggers (skill should activate on all of these):
URL patterns — activate immediately:
https://github.com/<owner>/<repo>/pull/<number>#pullrequestreview-<id>https://github.com/<owner>/<repo>/pull/<number>(when context implies review work)
Explicit user requests:
- "Fix the review comments"
- "Address the review feedback on this PR"
- "There are unresolved review comments — fix them"
- "Resolve the conversations on this PR"
- "Handle all unresolved comments on this PR"
- "For each review comment: fix, test, commit, reply, resolve"
- "Close the open review threads"
- "Check this review and resolve the conversation when fixed"
- "Resolve outstanding review feedback"
- "The PR has changes requested — fix it"
Implicit / agent-detected:
- A PR is in "changes requested" state and the agent is asked to work on it
- A PR has unresolved review threads and the user asks to improve or merge the PR
- An agent working on a PR detects open review conversations
When not to use
- No unresolved review comments exist
- Request is only to summarize or describe feedback without code changes
- All targeted threads are already resolved or outdated and acknowledged
- Branch/worktree is intentionally read-only
Required inputs
Collect before execution:
- repository owner/name
- pull request number or URL
- optional review id to scope comments (e.g.
pullrequestreview-<id>) - branch/worktree decision (skip asking if the current checkout is already on the PR's head branch — see step 1)
- required validation commands for the repository
When a review URL is provided (
github.com/<owner>/<repo>/pull/<number>#pullrequestreview-<id>),auto-extract owner, repo, PR number, and review id from it.Only branch/worktree choice and validation commands still need confirming.
Optional:
- linked issue reference (e.g.
equinor/fusion-core-tasks#432) - commit granularity preference when comments overlap the same file
Instructions
Follow this phase order unless the user explicitly asks for a different sequence: fetch → analyze → fix → validate → push → reply → resolve → verify. Do not interleave GitHub thread mutations with code-editing retries.
Determine branch/worktree context
- Check the current checkout's branch against the PR's head branch first.
- If the current branch already matches the PR's head branch, proceed directly there — do not ask about a worktree.
- Otherwise (current branch differs, or the workspace is on a shared/long-lived branch like
main/master), ask whether to use a dedicated git worktree before any other workflow questions. - If yes, use/create the worktree and continue there.
Gather unresolved comments and create working tracker
- If a review URL with
#pullrequestreview-<id>was provided, parse owner, repo, PR number, and review id from it before fetching. - Copy or open
assets/review-resolution-checklist.md—this becomes your working document. Fill in the context section and update the comment tracking table as you work through each thread. - Fetch review threads for the PR and filter unresolved threads.
- If a specific review id or review URL is provided, limit to comments from that review.
- Within the targeted review, collect all comments associated with that review id (do not include replies from other reviews unless explicitly requested).
- Build a working list with: thread id, comment id, parent review id, file path, original comment body, and all subsequent replies in that thread (including contributor replies).
- Read the full reply chain for each thread — contributors may have added clarifications, constraints, or additional context that must be taken into account when deciding how to resolve the comment.
- Capture a baseline list of targeted thread ids and unresolved-thread count before any GitHub mutation.
- If a review URL with
Understand, research, and judge each comment
- Read the referenced file(s) and nearby logic.
- Decide whether the feedback is correct, partially correct, outdated, or incorrect against the current code, requirements, and surrounding context.
- Reviewers are not automatically correct; do not make code churn just to satisfy a comment that is stale or wrong.
- If the feedback is correct, verify root cause and identify the smallest safe fix.
- If the feedback is clearly incorrect or outdated, prepare a concise evidence-based reply instead of changing code unnecessarily.
- If uncertain, inspect adjacent tests/usages before editing.
- If doubt remains after local research, ask the user before making code changes or mutating that review thread.
Fix, check, commit (per comment)
- Apply focused code/doc changes only for comments you judged valid or partially valid.
- Run targeted checks first, then required repo checks.
- Create one commit per comment when practical.
- If two comments require one inseparable change, use one commit and map both comments to that commit in replies.
- For comments you decline, record the reasoning in the tracker so the eventual reply is explicit and auditable.
Push once after all fixes
- After all comment-related commits are created, push branch updates once.
Reply and resolve each review comment
- Before any thread mutation, prefer structured tooling in this order:
- dedicated GitHub MCP review-thread reply/resolve tools exposed in the current client session,
- the bundled GraphQL assets or bundled
scripts/resolve-review-comments.sh, - never ad hoc temporary Python scripts, one-off batch helpers, or blind
gh apiretry loops.
- Prepare exactly one planned reply per targeted thread from the checklist/tracker before posting anything.
- Re-fetch the current thread state before retrying if a reply/resolve attempt errors, times out, or returns an uncertain result.
- For each thread, these two steps are mandatory and must happen together in order unless the thread is still uncertain and waiting for user input:
- Post a reply on the thread: either describe what changed and include the commit hash(es), or explain why no code change was made because the comment is incorrect/outdated.
- Resolve the thread immediately after the reply is posted — never before.
- Post at most one reply attempt per thread per run.
- If an equivalent agent-authored reply already exists, do not post another reply; reuse it and only resolve if the thread is still unresolved.
- If a different agent-authored reply already exists, stop and inspect manually rather than stacking another comment.
- Do not resolve a thread that is still uncertain; escalate it to the user first.
- Never resolve a thread without a reply. Never post a reply without then resolving the thread.
- Keep replies specific: name the file/line changed and the commit, not just "fixed".
- Before any thread mutation, prefer structured tooling in this order:
Verify closure state
- Re-check review threads and confirm no targeted unresolved threads remain.
- Confirm the targeted unresolved-thread count dropped to zero and no duplicate agent replies were created during this run.
- Re-check latest CI status if the workflow expects green checks.
Ask whether to request a new review from the original review author
- After fixes are pushed and threads are resolved, ask if the user wants to request a new review from the author of the review comments.
- If yes, request review from that reviewer username and report that the request was sent.
Optional scripted execution
- Use
scripts/get-review-comments.shto fetch matching review comments (including sub-comments associated with the review id). - Results are limited to the first 100 review threads and first 100 comments per thread.
- Example test:
skills/.experimental/fusion-github-review-resolution/scripts/get-review-comments.sh --owner equinor --repo fusion-skills --pr 27 --review-id 3837647674
- Use
--include-outdatedwhen you need comments from outdated matching threads. - Use
scripts/resolve-review-comments.shto reply+resolve matching threads with a dry-run-first duplicate-reply guard. - Keep default dry-run behavior; use
--applyonly after fixes are committed and pushed. - By default the script refuses to add another authenticated-user reply to a thread that already contains one; use
--allow-additional-replyonly after manual inspection. - Example dry-run:
skills/.experimental/fusion-github-review-resolution/scripts/resolve-review-comments.sh --owner equinor --repo fusion-skills --pr 27 --review-id 3837647674 --include-resolved
- Example apply:
skills/.experimental/fusion-github-review-resolution/scripts/resolve-review-comments.sh --owner equinor --repo fusion-skills --pr 27 --review-id 3837647674 --apply --message "Addressed in <commit>: <what changed>."
- Use
Tooling map (MCP vs GraphQL)
Use GitHub MCP tools for high-level PR operations and any dedicated review-thread mutations the current client exposes. Use GraphQL for thread-level review operations when MCP coverage is missing.
| Workflow action | Preferred tool | Notes |
|---|---|---|
| Request reviewer / update PR metadata | mcp_github_update_pull_request | Works for collaborator reviewers and standard PR updates. |
| Create or submit PR review | mcp_github_pull_request_review_write | Handles pending review lifecycle actions. |
| Add general PR comment | mcp_github_add_issue_comment | Adds issue-style comment to PR conversation, not inline thread reply. |
| List review threads and comments | assets/pull-request-review-threads.graphql | Use with gh api graphql -f query=@assets/pull-request-review-threads.graphql for thread-level context. |
| Count unresolved threads for specific review id | assets/unresolved-thread-count-for-review.graphql | Post-process response (for example with jq) to filter by review id and unresolved state. |
| Reply to a review thread | Dedicated MCP review-thread reply tool, otherwise assets/add-pull-request-review-thread-reply.graphql | Prefer the MCP tool when available; otherwise use the bundled thread-scoped mutation instead of ad hoc scripts. |
| Resolve a review thread | Dedicated MCP review-thread resolve tool, otherwise assets/resolve-review-thread.graphql | Use the matching structured tool for the current client/session. resolveReviewThread uses threadId, not pullRequestReviewThreadId. |
| List PR reviews (review URL/id lookup support) | assets/pull-request-reviews.graphql | Useful when starting from review URL context. |
Pro tip: See each
.graphqlfile in assets for complete mutation/query syntax and parameter names.
GraphQL cost awareness
Review-resolution workflows make multiple GraphQL mutation calls (reply + resolve per thread). Be conservative:
- Mutations cost 5 secondary-limit points each (vs 1 for read queries). Budget accordingly when processing many threads.
- Pause at least 1 second between consecutive mutation calls to avoid secondary rate limits.
- Keep
first/lastconnection arguments small (preferfirst: 100only when you need all threads in a single page). - If a secondary rate-limit error or
retry-afterheader is returned, stop processing and respect the indicated wait before retrying. - Always prefer a dedicated MCP review-thread tool over raw GraphQL when the client exposes one.
Token budget guidance
- Fetch the full thread list once and reuse it for all per-thread work; do not re-fetch threads between reply and resolve.
- Budget estimate: for N unresolved threads expect ~1 list call + N reply mutations + N resolve mutations = 1 + 2N calls. A 10-thread review costs ~21 calls.
- If the thread count exceeds 15, warn the user about rate-limit risk before starting mutations and offer to batch in smaller groups.
- Cache PR metadata (title, branch, CI status, changed files) from the first fetch and reuse it for commit messages and replies.
- Avoid redundant PR-level reads between steps; the data does not change within a single resolution run.
Expected output
Return a concise report containing:
- comments processed count,
- disposition summary (fixed, declined with rationale, escalated to user),
- files changed,
- commit list (hash + message),
- validation commands run and outcomes,
- confirmation of push,
- reply/resolve confirmation per thread,
- completed checklist location,
- any remaining unresolved threads or blockers.
Linked issue usage
When an issue is provided (for example equinor/fusion-core-tasks#432):
- mention the issue in progress/final summaries,
- keep implementation aligned with issue scope,
- avoid expanding to unrelated PR automation.
Safety & constraints
- This skill is mutation-capable. Repository-local workflow instructions take precedence over inline guidance when they conflict.
- Never expose secrets or tokens in logs/replies.
- Prefer argv-based process execution over shell-interpolated command strings.
- Keep diffs minimal and scoped to review feedback.
- Do not assume review feedback is correct; reason about it against the code and requirements first.
- If a comment remains ambiguous after research, ask the user instead of guessing.
- Do not resolve a thread without posting a concrete fix reply.
- Do not claim checks passed unless commands were actually run.
- Do not force-push; use regular commits and a single push after all fixes.
- If a comment is outdated but still unresolved, either:
- resolve with a clear explanation and commit reference, or
- leave unresolved and report why.
- In scripted mode, keep default dry-run behavior and require explicit
--applyfor mutations.
모든 파일
0개 파일fusion-github-review-resolution 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/equinor/fusion-skills/blob/main/skills/.experimental/fusion-github-review-resolution/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
복사





집
