skills/.experimental/fusion-github-review-resolution/SKILL.md
Resolves unresolved GitHub PR review threads end-to-end: evaluates whether each review comment is correct, applies a targeted fix when valid, replies with rationale when not, commits, and resolves the thread. USE FOR: unresolved review threads, PR review feedback, changes requested PRs, PR review URLs (#pullrequestreview-...), fix the review comments, close the open threads, address PR feedback. DO NOT USE FOR: summarizing feedback without code changes, creating new PRs, or read-only branches.
npx skillsauth add equinor/fusion-skills fusion-github-review-resolutionInstall 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.
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:
Implicit / agent-detected:
Do not use this skill when:
Collect before execution:
pullrequestreview-<id>),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 context:
equinor/fusion-core-tasks#432),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.
Ask whether to use a dedicated git worktree
Gather unresolved comments and create working tracker
#pullrequestreview-<id> was provided, parse owner, repo, PR number, and review id from it before fetching.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.Understand, research, and judge each comment
Fix, check, commit (per comment)
Push once after all fixes
Reply and resolve each review comment
scripts/resolve-review-comments.sh,gh api retry loops.Verify closure state
Ask whether to request a new review from the original review author
Optional scripted execution
scripts/get-review-comments.sh to fetch matching review comments (including sub-comments associated with the review id).skills/.experimental/fusion-github-review-resolution/scripts/get-review-comments.sh --owner equinor --repo fusion-skills --pr 27 --review-id 3837647674--include-outdated when you need comments from outdated matching threads.scripts/resolve-review-comments.sh to reply+resolve matching threads with a dry-run-first duplicate-reply guard.--apply only after fixes are committed and pushed.--allow-additional-reply only after manual inspection.skills/.experimental/fusion-github-review-resolution/scripts/resolve-review-comments.sh --owner equinor --repo fusion-skills --pr 27 --review-id 3837647674 --include-resolvedskills/.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 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. ⚠️ GraphQL note: 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.
Review-resolution workflows make multiple GraphQL mutation calls (reply + resolve per thread). Be conservative:
first/last connection arguments small (prefer first: 100 only when you need all threads in a single page).retry-after header is returned, stop processing and respect the indicated wait before retrying.Return a concise report containing:
When an issue is provided (for example equinor/fusion-core-tasks#432):
--apply for mutations.tools
Use Fusion DevTools CLI (fdev) for API testing, token acquisition, service discovery, and person lookup during development. USE FOR: calling Fusion REST APIs, getting access tokens as JSON, discovering services and environments, resolving persons, PIM role activation. DO NOT USE FOR: modifying backend service code, deploying services, infrastructure changes, CI/CD pipeline configuration, or Service Bus operations.
testing
Main Copilot skill gate for the Fusion ecosystem — cross-domain router. USE FOR: routing between different Fusion domains (skills, issues, PRs, reviews) when the right domain skill is unclear; getting install guidance for missing skills. DO NOT USE FOR: skill lifecycle operations (use fusion-skills directly), tasks where a specific Fusion skill is already active.
tools
Entrypoint for all Fusion skill lifecycle operations. USE FOR: finding, installing, updating, syncing, or greenkeeping skills; setting up skill automation; creating or authoring a new skill; reporting a bug with a skill. DO NOT USE FOR: resolving GitHub issues, reviewing PRs, planning task breakdowns, or authoring GitHub issues — those are handled by other Fusion skills.
tools
Creates or modernizes repository skills with clear activation cues, purposeful support files, and practical review loops. USE FOR: creating a new skill, tightening an existing skill, improving discovery wording, and structuring references/assets/optional helper agents when they genuinely add value. DO NOT USE FOR: product-code changes, routine copy edits outside skills/, or documentation that should not become an installable skill.