Logo Resolve Fixed Pr Comments

Resolve Fixed Pr Comments

Tổ chứcPhổ biến
NeoLabHQ
resolve-fixed-pr-comments

Verify what PR review comments have been addressed (committed/pushed OR uncommitted local changes) and resolve the threads that are genuinely fixed or no longer relevant.

Tổng quan

Nhà phát hànhNeoLabHQ
Kho mãcontext-engineering-kit
Tên kỹ năngresolve-fixed-pr-comments
Sao
1.7K
Bản fork
159
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépGPL-3.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được NeoLabHQ công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Resolve Fixed Pr Comments trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/NeoLabHQ/context-engineering-kit/tree/master/antigravity/skills/resolve-fixed-pr-comments
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NeoLabHQ/context-engineering-kit.git /tmp/context-engineering-kit
mkdir -p .claude/skills
cp -r /tmp/context-engineering-kit/antigravity/skills/resolve-fixed-pr-comments .claude/skills/resolve-fixed-pr-comments
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Resolve Fixed Pr Comments trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Resolve Fixed Pr Comments ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Resolve Fixed Pr Comments với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Resolve Fixed PR Review Comments

Load ONLY open/UNRESOLVED PR review threads, verify each one against the CURRENT state of the codebase (the fix may be committed/pushed OR exist only as uncommitted local changes — both count), and resolve ONLY the threads that are genuinely fixed or no longer relevant. The single permitted write action is resolving a thread. Nothing else is touched.

Critical Guidelines

Violating the letter of these rules means failing the task. If you fail the task, you will be killed!

  • When unsure, LEAVE THE THREAD UNRESOLVED. Better to leave a fixed comment unresolved than to wrongly resolve an unfixed one.
  • You MUST load ONLY threads where isResolved/is_resolved is false. Skip resolved threads.
  • You MUST observe only the CURRENT state of the codebase. Read the file as it exists NOW. Do NOT reason about how the code used to be, what a commit changed, or git history as evidence of a fix — only whether the requirement is satisfied in the current files counts.
  • A fix is VALID whether it is already committed/pushed OR exists only as uncommitted local changes. Both are acceptable evidence. Inspect the working tree as-is.
  • You MUST NOT modify code, create/edit/delete any file, or run tests, linters, formatters, or builds.
  • You MUST NOT push, pull, commit, stash, checkout, switch, reset, revert, rebase, merge, cherry-pick, or perform ANY mutating git operation. ONLY read-only inspection (git status, git diff, git log, git branch) is allowed, and only to observe the current state.
  • You MUST NOT add a comment to the PR, reply to a thread, submit a review, approve, or request changes. The ONLY write action permitted against GitHub is resolving a thread that is genuinely fixed.
  • You MUST be critical and perfectionist. A comment is "fixed" ONLY when ALL of its requirements are FULLY satisfied in the current codebase. Partially-addressed comments, unaddressed nitpicks, and "close enough" changes stay UNRESOLVED.
  • You MUST NOT resolve a thread you did not verify against an actual file. No verification → no resolve.

Red Flags - STOP and Leave Unresolved

If any of these describe your reasoning, do NOT resolve the thread:

  • "The fix is probably there, I'll resolve it." → No. Verify against the current file or leave it.
  • "The commit message says it was fixed." → Commit messages and history are NOT evidence. Read the current file.
  • "Most of the comment is addressed." → Partial ≠ fixed. Leave unresolved.
  • "It's just a nitpick, resolving it cleans up the PR." → Unaddressed nitpicks stay unresolved.
  • "It's no longer relevant because the code moved." → Only resolve if the requirement is genuinely satisfied or genuinely obsolete in the CURRENT code — not because it's inconvenient to verify.
  • "I'll quickly fix it myself, then resolve." → FORBIDDEN. No code edits. If it isn't already fixed, leave it unresolved.
  • "I'll reply explaining why I resolved it." → FORBIDDEN. No replies, no comments. Resolve silently or leave it.
  • "I'll resolve all of them since the branch looks done." → Resolve per-thread, each on its own verified evidence.

Rationalization Table

ExcuseReality
"The fix was committed, so it's done."Read the CURRENT file and confirm the requirement is satisfied. Committed ≠ verified.
"Git diff shows the change."A diff is historical reasoning. Confirm the requirement holds in the current file content, not that something changed.
"It's uncommitted, so it doesn't count yet."Uncommitted local changes ARE valid evidence. Inspect the working tree as-is.
"I'll just make the small fix and resolve."Editing code is strictly forbidden. Unfixed → unresolved.
"A reply would be polite."No replies/comments. The only write action is resolving.
"Nitpick is trivial, resolve to tidy up."Unaddressed = unresolved, regardless of triviality.
"Reviewer would obviously accept this."You are not the reviewer. Resolve only on satisfied requirements, not on predicted approval.
"Not 100% sure, but likely fixed."Unsure = leave unresolved.

How to Use

Work one thread at a time: (1) load unresolved threads with their GraphQL node id, (2) for each, read the current file(s) referenced and check every requirement against the present content, (3) resolve ONLY if fully satisfied/obsolete, otherwise skip. Report what was resolved and what was left and why.

Step 0: Verify what tools are available

  1. Check if GitHub CLI is installed and authenticated:

    bash
    gh auth status
  2. Check if the GitHub MCP server is available:

    bash
    mcp__MCP_DOCKER__pull_request_read

    or simular command without MCP_DOCKER prefix, if installed directly.

  • if both are available, use any that have enough accesses to the repository.
  • if github mcp server avaiable but have different structure, adjust in order to fit the expected structure.
  • if none is available, try to load directly through curl in case if it is public repository. If it is private, ask user to install GitHub CLI or GitHub MCP server.
  • if MCP server not installed, but github cli is installed, but not authenticated, ask user to run gh auth login to authenticate.

Step 1: Resolve the Target PR

  • An explicit PR argument ALWAYS takes precedence over current-branch resolution. If a PR number or URL was passed, use it (a URL like https://github.com/{owner}/{repo}/pull/{n} → number {n}) and do NOT consult the current branch.
  • Otherwise default to the PR of the CURRENT branch:
bash
gh pr view --json number,url,headRefName   # current branch's PR
  • Resolve repo owner/name: gh repo view --json owner,name.
  • If no PR exists for the branch, gh pr view errors with "no pull requests found" — STOP and report that no PR is associated with the branch (ask for a PR number/URL).

Step 2: Retrieve UNRESOLVED Comments

Resolved/unresolved is a GraphQL reviewThreads { isResolved } concept — the REST /pulls/{n}/comments endpoint does NOT expose it. Use one of the two approaches below; if the primary is unavailable, fall back to the other.

Primary: gh CLI (GraphQL)

Filter isResolved == false directly in the jq:

bash
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!){
  repository(owner:$owner,name:$repo){
    pullRequest(number:$pr){
      reviewThreads(first:100){
        nodes {
          id
          isResolved
          isOutdated
          path
          line
          startLine
          originalLine
          comments(first:50){
            nodes { author{login} body diffHunk url }
          }
        }
      }
    }
  }
}' -F owner=OWNER -F repo=REPO -F pr=PR_NUMBER \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[]
         | select(.isResolved==false)
         | {id, path, isOutdated,
            line: (.line // .startLine // .originalLine),
            comments: [.comments.nodes[]
             | {author: .author.login, url, body, diffHunk}]}]'

This returns each unresolved thread with its GraphQL node id (needed to resolve it in Step 4), its file path, an isOutdated flag, a usable line, and ordered comments (author, body, permalink url, diffHunk).

IMPORTANT: For OUTDATED threads line is null (the diff moved). The jq above already falls back line // startLine // originalLine, so line is never null when any anchor exists. When ALL three are null, omit the :<line> segment entirely in the template — never render path:null.

Fallback: GitHub MCP

If the GitHub MCP server (MCP_DOCKER) is available, use the mcp__MCP_DOCKER__pull_request_read tool with method: "get_review_comments":

mcp__MCP_DOCKER__pull_request_read
  method: "get_review_comments"
  owner: "OWNER"
  repo: "REPO"
  pullNumber: PR_NUMBER
  perPage: 100

It returns review_threads[], each with is_resolved, is_outdated, is_collapsed (all snake_case — verified against this tool's response) and comments[] (body, path, author, html_url). Keep only threads where is_resolved is false. Note the MCP comment objects expose path but NOT a line number, so use the html_url as the location anchor. Paginate with after: <endCursor> while pageInfo.hasNextPage is true.

The MCP review-thread object also carries the thread node id (the PRRT_... node ID). Capture it per thread — mcp__MCP_DOCKER__pull_request_review_write with method: "resolve_thread" needs it in Step 4.

Step 3: Verify Each Thread Against the CURRENT Codebase

For EACH unresolved thread, gather the concrete requirement(s) and verify them against the present file content. Apply the Critical Guidelines strictly.

  1. Identify what the comment actually requires. If a HUMAN reviewer left feedback, the requirement is THAT feedback. If only a bot/AI suggestion exists (Claude, CodeRabbit, Copilot, etc.), the requirement is that suggested fix. A thread may contain multiple requirements — ALL must be satisfied to count as fixed.
  2. Open the referenced file(s) at path and read the CURRENT content (use the Read tool / git show :<path> is NOT needed — just read the working-tree file). Optionally run git diff -- <path> or git status ONLY to observe current uncommitted changes; never to reason about history as proof.
  3. Decide the disposition:
DispositionConditionAction
FIXEDEvery requirement in the thread is fully satisfied in the current file content (committed OR uncommitted).Mark to resolve in Step 4.
OBSOLETEThe code the comment referred to genuinely no longer exists / the concern is genuinely moot in the current code.Mark to resolve in Step 4.
NOT FIXEDAny requirement is unmet, partially met, or you cannot confirm it from the current files.LEAVE UNRESOLVED. Do nothing.
UNSUREYou cannot confidently verify satisfaction.LEAVE UNRESOLVED. Do nothing.

Do NOT edit code to make a thread pass. Do NOT run tests/builds/linters to "check". Verification is reading the current source and judging whether the requirement is met.

Step 4: Resolve the Genuinely-Fixed Threads

For each thread marked FIXED or OBSOLETE, resolve it using the thread's node id captured in Step 2. Use whichever path is available (prefer the one you used to load comments). Resolving an already-resolved thread is a harmless no-op.

Primary: gh CLI (GraphQL resolveReviewThread mutation)

The resolveReviewThread mutation takes a ResolveReviewThreadInput whose required field is threadId (the GraphQL node id from Step 2's reviewThreads.nodes[].id). Verified against GitHub's GraphQL schema via introspection (ResolveReviewThreadInput.threadId: ID!).

bash
gh api graphql -f query='
mutation($threadId:ID!){
  resolveReviewThread(input:{threadId:$threadId}){
    thread { id isResolved }
  }
}' -F threadId='PRRT_kwDOxxxxxxxxxxxxxxxx'

On success the response is {"data":{"resolveReviewThread":{"thread":{"id":"PRRT_...","isResolved":true}}}}. Confirm isResolved is true.

Fallback: GitHub MCP (pull_request_review_write → resolve_thread)

The GitHub MCP server CAN resolve threads via mcp__MCP_DOCKER__pull_request_review_write with method: "resolve_thread". It requires only threadId (the thread node ID, e.g. PRRT_kwDOxxx). Per the tool's own documentation, owner/repo/pullNumber are NOT used by this method, but the tool schema marks them required — pass the PR's owner/repo/pullNumber to satisfy validation; they are ignored for the resolve operation.

mcp__MCP_DOCKER__pull_request_review_write
  method: "resolve_thread"
  threadId: "PRRT_kwDOxxxxxxxxxxxxxxxx"
  owner: "OWNER"
  repo: "REPO"
  pullNumber: PR_NUMBER

If the MCP server is NOT available or its pull_request_review_write lacks resolve_thread, fall back to the gh CLI GraphQL mutation above.

ONLY resolve_thread is permitted. Do NOT use unresolve_thread, create, submit_pending, delete_pending, or any event (APPROVE/REQUEST_CHANGES/COMMENT) — those are write actions this skill forbids.

Parameters Explained

ParameterPathTypeRequiredDescription
threadIdgh CLI & MCPstring (ID!)YesThe review thread's GraphQL node id (reviewThreads.nodes[].id, e.g. PRRT_kwDO...). This is the thread id, NOT a comment id and NOT a numeric REST id.
methodMCPstringYes (MCP)Must be "resolve_thread".
ownerMCPstringYes (MCP schema)Repo owner. Ignored by resolve_thread but required by the tool schema.
repoMCPstringYes (MCP schema)Repo name. Ignored by resolve_thread but required by the tool schema.
pullNumberMCPnumberYes (MCP schema)PR number. Ignored by resolve_thread but required by the tool schema.
clientMutationIdgh CLIstringNoOptional dedupe token on the GraphQL input. Omit normally.

Step 5: Report

Summarize without taking any further action:

  • Target PR (number + url).
  • Count of unresolved threads loaded.
  • Threads RESOLVED, each with its path:line (or path if outdated) and a one-line reason (FIXED / OBSOLETE) plus the evidence in the current code.
  • Threads LEFT UNRESOLVED, each with a one-line reason (NOT FIXED / partial / UNSURE).
  • Any limitation hit (e.g. MCP unavailable, all threads already resolved).

Examples

Input: resolve-fixed-pr-comments (no argument, current branch has PR #42)

Process: Load PR #42's unresolved threads (Step 2). Thread A on src/auth.ts:30 requires "add error handling for invalid token". Read current src/auth.ts — a try/catch now wraps the token check (uncommitted local change). Disposition FIXED → resolve via resolveReviewThread(threadId: "PRRT_..."). Thread B on README.md:10 is a nitpick "fix typo 'teh'". Read current README.md — still says "teh". Disposition NOT FIXED → leave unresolved.

Output: "PR #42: 2 unresolved threads loaded. Resolved 1 — src/auth.ts:30 (FIXED: try/catch added around token validation in working tree). Left unresolved 1 — README.md:10 (NOT FIXED: 'teh' typo still present)."

Input: resolve-fixed-pr-comments https://github.com/acme/app/pull/7

Process: Argument takes precedence over current branch. PR #7. One thread requires renaming getUser → fetchUser AND updating its callers. Current code renamed the function but one caller still uses getUser. Requirement only partially met → NOT FIXED → leave unresolved.

Output: "PR #7: 1 unresolved thread loaded. Resolved 0. Left unresolved 1 — src/user.ts:12 (NOT FIXED: function renamed but caller in src/page.ts:5 still calls getUser)."

Troubleshooting / Common Issues

SituationHandling
No PR for current branchgh pr view errors → report and request a PR number/URL.
Argument is a URLExtract trailing number after /pull/.
Zero unresolved threadsResolve nothing; report "no unresolved comments".
>100 threadsPaginate (GraphQL after cursor / MCP after) before verifying.
MCP unavailableUse gh GraphQL for both loading and resolving; if both unavailable, report limitation.
MCP resolve_thread rejects missing owner/repo/pullNumberThe tool schema requires them even though the method ignores them — pass the PR's owner/repo/pullNumber.
Could not resolve to a node with the global idWrong id — ensure you pass the thread node id (PRRT_...) from reviewThreads.nodes[].id, not a comment id or numeric REST id.
Resolve mutation returns isResolved: true for a thread you didn't mean to touchYou resolved the wrong thread — there is no safe auto-undo permitted by this skill (unresolve is a forbidden write); report it to the user.
Fix exists only as uncommitted changesValid evidence — inspect the working-tree file and resolve if the requirement is satisfied.
Cannot confirm a requirement from current filesLeave the thread UNRESOLVED. Never resolve on assumption.
Tempted to edit code so a thread passesForbidden. No code modifications. Unfixed stays unresolved.

Câu hỏi thường gặp

Kỹ năng AI Resolve Fixed Pr Comments làm được gì?

Verify what PR review comments have been addressed (committed/pushed OR uncommitted local changes) and resolve the threads that are genuinely fixed or no longer relevant.

Vì sao nên dùng Resolve Fixed Pr Comments trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Resolve Fixed Pr Comments là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Resolve Fixed Pr Comments trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/NeoLabHQ/context-engineering-kit/tree/master/antigravity/skills/resolve-fixed-pr-comments. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Resolve Fixed Pr Comments?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Resolve Fixed Pr Comments với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Resolve Fixed Pr Comments với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Resolve Fixed Pr Comments có miễn phí không?

Có. Kỹ năng này được NeoLabHQ phát hành trên GitHub theo giấy phép GPL-3.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇