Github Pr Review Fix logo

Github Pr Review Fix

CommunityPopular
IvanMurzak
github-pr-review-fix

Review and resolve PR comments from GitHub. Validates each comment, fixes legitimate issues.

Overview

PublisherIvanMurzak
RepositoryUnity-MCP
Skill namegithub-pr-review-fix
Stars
4.4K
Forks
387
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by IvanMurzak on GitHub. Read the source before you install it.

Installation

Install the Github Pr Review Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/IvanMurzak/Unity-MCP/tree/main/.claude/skills/github-pr-review-fix
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/IvanMurzak/Unity-MCP.git /tmp/Unity-MCP
mkdir -p .claude/skills
cp -r /tmp/Unity-MCP/.claude/skills/github-pr-review-fix .claude/skills/github-pr-review-fix
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Github Pr Review Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Github Pr Review Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Github Pr Review Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Review PR Comments

Review unresolved comments on the GitHub pull request associated with the current branch. Validate each comment, then fix legitimate issues.

Step 1 — Identify the Pull Request

  1. If $ARGUMENTS contains a PR number, use it.
  2. Otherwise, detect the current git branch and find its open PR:
    bash
    gh pr view --json number,url,headRefName,baseRefName
  3. If no PR is found, stop and tell the user.

Step 2 — Fetch All Unresolved Review Comments

Fetch PR review comments (not issue-level comments) using the GitHub CLI:

bash
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate

Filter to comments where the thread is not resolved. Group comments by thread (same in_reply_to_id or same path + line/original_line). For each thread, treat the first comment as the review request and subsequent comments as discussion.

Also fetch general PR comments (issue-level):

bash
gh api repos/{owner}/{repo}/issues/{number}/comments --paginate

If there are zero unresolved comments, report that and stop.

Step 3 — Validate and Fix Comments in Parallel (Sub-agents)

For each unresolved comment or comment thread, spawn a sub-agent in parallel. Use model: "sonnet" for cost efficiency. Each agent validates the comment and, if legitimate, fixes it immediately in place.

Conflict avoidance: If multiple comments target the same file, run those agents sequentially (not in parallel) to avoid edit conflicts. Comments on different files run in parallel.

Sub-agent Prompt Template

You are a code review comment validator and fixer. Your job is to determine whether a PR review comment identifies a real issue, and if so, fix it immediately.

## Comment Details
- **Author**: {comment_author}
- **File**: {file_path}
- **Line(s)**: {line_range}
- **Comment**: {comment_body}
- **Thread context** (if any): {thread_replies}
- **Comment ID**: {comment_id}

## Phase 1 — Validate

1. Read the file referenced in the comment. Focus on the specific lines mentioned.
2. Read surrounding context (50 lines above and below) to understand the code fully.
3. Analyze whether the comment identifies a legitimate issue:
   - Is the described problem actually present in the code?
   - Is the suggestion an improvement or just a style preference?
   - Does the comment apply to the current state of the code (it may already be fixed)?
   - Is this a nitpick / optional suggestion vs. a real bug, logic error, or missing handling?

4. Decide: FIX or IGNORE.
   - If IGNORE, skip to the report below.
   - If FIX, proceed to Phase 2.

## Phase 2 — Fix (only if verdict is FIX)

1. Apply the minimal fix that addresses the comment. Do not refactor unrelated code.
2. Ensure the fix:
   - Does not break surrounding logic
   - Follows the existing code style and conventions
   - Preserves all existing functionality
3. If the fix requires changes in multiple locations within the same file, make all changes.
4. If you are unsure whether a fix is safe, do NOT apply it — set verdict to NEEDS_MANUAL_REVIEW instead.

HARD CONSTRAINTS:
- Only modify the file(s) specified. Do not touch other files.
- Do not add comments explaining the fix in the code.
- Do not refactor or "improve" code beyond what the comment asks for.
- Keep changes minimal and surgical.

## Report

Return your result in this exact format:

VERDICT: FIX | IGNORE | NEEDS_MANUAL_REVIEW
CONFIDENCE: HIGH | MEDIUM | LOW
REASON: <1-2 sentence explanation>
SUMMARY: <1 sentence describing what was changed, only if VERDICT is FIX>
FILE: {file_path}
LINES: {line_range}
COMMENT_ID: {comment_id}
FIXED: YES | NO

Step 4 — Resolve Fixed Comments on GitHub

After a fix sub-agent successfully fixes an issue, resolve the corresponding review thread on GitHub using the GraphQL API.

  1. First, find the thread ID for the comment. Use the node_id from the comment (fetched in Step 2) to query the thread:

    bash
    gh api graphql -f query='
      query {
        node(id: "{comment_node_id}") {
          ... on PullRequestReviewComment {
            pullRequestReview {
              id
            }
            id
            isMinimized
          }
        }
      }
    '
  2. Resolve the review thread using the resolveReviewThread mutation. The thread ID can be obtained from the pull request's review threads:

    bash
    gh api graphql -f query='
      query {
        repository(owner: "{owner}", name: "{repo}") {
          pullRequest(number: {number}) {
            reviewThreads(first: 100) {
              nodes {
                id
                isResolved
                comments(first: 1) {
                  nodes {
                    id
                    body
                    path
                    line
                  }
                }
              }
            }
          }
        }
      }
    '

    Match the thread by comparing path and line (or body) to the fixed comment, then resolve it:

    bash
    gh api graphql -f query='
      mutation {
        resolveReviewThread(input: {threadId: "{thread_id}"}) {
          thread {
            id
            isResolved
          }
        }
      }
    '
  3. For every successfully fixed comment, reply to the thread before resolving it:

    bash
    gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
      -f body="## Agentic reply (github-pr-review-fix)

Fixed. {summary}

If you disagree with the fix, please reopen this thread."

Then resolve the thread. If the resolve call fails, note it in the report but do not block on it.

4. For **IGNORE** verdicts, reply to the comment thread with an explanation of why it was ignored, then resolve the thread:
```bash
gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
  -f body="## Agentic reply (github-pr-review-fix)

This comment was reviewed and determined to not require a code change.

**Reason**: {reason}

_If you disagree, please reopen this thread._"

Then resolve the thread using the same resolveReviewThread mutation as above.

  1. For NEEDS_MANUAL_REVIEW verdicts, reply to the thread but do not resolve it:
    bash
    gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
      -f body="## Agentic reply (github-pr-review-fix)

This comment requires manual review — the agent could not safely apply an automated fix.

Reason: {reason}

Leaving this thread unresolved for human attention."


## Step 5 — Report Results

After all agents complete, provide a summary table:
#FileCommentVerdictReasonResolved
1path/to/file.cs:42"Missing null check"FIXAdded null guardYes
2path/to/other.cs:10"Consider renaming"IGNOREStyle preference, no bugYes (replied)
3path/to/util.cs:77"Race condition"NEEDS_MANUAL_REVIEWUnsafe to auto-fix, needs human judgment—

For **IGNORE** verdicts, the reason is posted as a reply in the thread and the thread is resolved. The user can reopen if they disagree.

For **NEEDS_MANUAL_REVIEW** verdicts, explain why the agent couldn't safely apply a fix. These threads are left **unresolved** for human attention.

End with a count: `X comments fixed and resolved, Y ignored and resolved, Z need manual review.`

Frequently asked questions

What does the Github Pr Review Fix AI skill do?

Review and resolve PR comments from GitHub. Validates each comment, fixes legitimate issues.

Why use Github Pr Review Fix on TypingMind?

Because you install it once and use it with any model. Github Pr Review Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Github Pr Review Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/IvanMurzak/Unity-MCP/tree/main/.claude/skills/github-pr-review-fix. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Github Pr Review Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Github Pr Review Fix?

As many as you like. As long as a model supports skills, you can use Github Pr Review Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Github Pr Review Fix AI skill free?

Yes. It is published on GitHub by IvanMurzak under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇