
Gh Pr Review Fix
- 7 installs
- 5 repo stars
- Updated August 5, 2026
- bjornmelin/dev-skills
gh-pr-review-fix is a skill that fetches unresolved GitHub PR review threads and fixes them end-to-end until the PR is clean or blocked.
About
This skill resolves GitHub pull-request review comments end-to-end. Developers use it to fetch unresolved review threads, apply minimal verified fixes file-by-file, run repo-native verification, and re-check until the PR is clean or blocked. It commits one scoped conventional commit and pushes when checks pass.
- Fetches and normalizes unresolved GitHub PR review threads
- Applies minimal verified fixes and re-checks until clean or blocked
- Creates a scoped conventional commit and pushes when checks pass
Gh Pr Review Fix by the numbers
- 7 all-time installs (skills.sh)
- Ranked #457 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
gh-pr-review-fix capabilities & compatibility
- Capabilities
- code review
- Works with
- github
- Use cases
- code review · testing
What gh-pr-review-fix says it does
Fetch unresolved GitHub PR review threads, normalize them, fix them end-to-end, verify the results, and re-check until the PR is clean or blocked.
Apply the minimal fixes that fully resolve the findings.
Create one scoped conventional commit and push if checks pass.
npx skills add https://github.com/bjornmelin/dev-skills --skill gh-pr-review-fixAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 7 |
|---|---|
| repo stars | ★ 5 |
| Last updated | August 5, 2026 |
| Repository | bjornmelin/dev-skills ↗ |
What it does
Fetching and resolving unresolved GitHub PR review threads with minimal verified fixes, then committing and pushing.
Who is it for?
Developers resolving unresolved GitHub PR review comments end-to-end.
Skip if: Local review files, Codex reviews, Zen reviews, or passive PR monitoring.
When should I use this skill?
The user wants GitHub PR review comments resolved with minimal verified fixes.
By the numbers
- 8-step autonomous invocation workflow
Files
GitHub PR Review Fix
Use this skill as the sole GitHub PR review remediation workflow.
Autonomous Invocation
If the user explicitly invokes $gh-pr-review-fix with no extra detail:
1. Read the repo AGENTS.md. 2. Infer the target repo and PR with scripts/prepare_pr_bundle.py. 3. Fetch a normalized unresolved-thread bundle. 4. Prioritize valid findings by file and severity. 5. Apply the minimal fixes that fully resolve the findings. 6. Run repo-native verification. 7. Create one scoped conventional commit and push if checks pass. 8. Re-fetch unresolved threads and continue until zero remain or the workflow is blocked.
Stop and ask only when the repo/PR cannot be inferred, GitHub auth is unavailable, the worktree is too ambiguous to safely stage, or repo policy conflicts with automatic remediation.
Workflow
1. Read the repo AGENTS.md. 2. Prepare the target bundle:
python3 scripts/prepare_pr_bundle.py --out <json>- or pass
--repo,--pr, or--urlwhen the target is known
3. Render the review summary:
/home/bjorn/.codex/skill-support/bin/review-pack render --input <json> --format md
4. Work file-by-file:
- resolve correctness and safety findings first
- prefer reviewer suggestion blocks when they are valid
- keep changes minimal and scoped
5. Verify with repo-native checks before considering a finding done. 6. Use $commit only if you need help staging a mixed tree; otherwise keep this workflow self-contained. 7. Re-run scripts/prepare_pr_bundle.py after each pass to confirm what remains unresolved. 8. If the task becomes passive or continuous monitoring rather than active remediation, switch to $babysit-pr.
Use When
- The user asks to fix GitHub PR review comments end-to-end.
- The current task is centered on unresolved review threads in a PR.
Do Not Use When
- The input is a local review file, Codex review, Zen review, or manual notes.
- The task is passive PR monitoring.
- The task is only CI remediation with no review-thread context.
Direct Tool Policy
- Use GitHub CLI or GitHub connector/API as the source of truth for PR metadata and review threads.
- Use Context7 for current API docs when the fix touches changing library APIs.
- Use Exa or
web.runonly when a review fix needs current external confirmation. - Do not route through
context7-researchorweb-research-stack.
Outputs
- normalized PR review bundle
- short prioritized remediation summary
- verified fixes
- commit and push summary when a commit is created
- terminal status:
completed,blocked, orneeds-user
Resources
scripts/prepare_pr_bundle.py
interface:
display_name: "GH PR Review Fix"
short_description: "Resolve GitHub PR review threads end-to-end"
default_prompt: "Use $gh-pr-review-fix to infer the target PR, fetch unresolved review threads, implement minimal verified fixes, and re-check until the PR is clean or blocked."
policy:
allow_implicit_invocation: false
dependencies:
tools:
- type: "mcp"
value: "context7"
description: "Current docs when review fixes touch changing APIs"
- type: "mcp"
value: "exa"
description: "Supplemental latest research for non-trivial migrations"
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import json
import re
import subprocess
import sys
import tempfile
from pathlib import Path
def run(args: list[str]) -> str:
proc = subprocess.run(args, check=True, capture_output=True, text=True)
return proc.stdout.strip()
def infer_repo(explicit_repo: str | None) -> str:
if explicit_repo:
return explicit_repo
try:
return json.loads(run(["gh", "repo", "view", "--json", "nameWithOwner"]))["nameWithOwner"]
except Exception:
remote = run(["git", "remote", "get-url", "origin"])
match = re.search(r"github\.com[:/](.+?)(?:\.git)?$", remote)
if not match:
raise RuntimeError("Could not infer GitHub repository from gh or git remote")
return match.group(1)
def infer_pr(explicit_pr: int | None, explicit_url: str | None, repo: str) -> int:
if explicit_pr:
return explicit_pr
if explicit_url:
match = re.search(r"/pull/(\d+)", explicit_url)
if match:
return int(match.group(1))
raise RuntimeError("Could not parse PR number from URL")
try:
return json.loads(run(["gh", "pr", "view", "--json", "number", "-R", repo]))["number"]
except Exception:
branch = run(["git", "rev-parse", "--abbrev-ref", "HEAD"])
prs = json.loads(run(["gh", "pr", "list", "-R", repo, "--head", branch, "--json", "number", "--limit", "1"]))
if prs:
return int(prs[0]["number"])
raise RuntimeError("Could not infer PR number from explicit input, current branch, or gh pr view")
def main() -> int:
parser = argparse.ArgumentParser(description="Infer repo/PR and fetch a normalized review bundle.")
parser.add_argument("--repo")
parser.add_argument("--pr", type=int)
parser.add_argument("--url")
parser.add_argument("--out", type=Path)
args = parser.parse_args()
repo = infer_repo(args.repo)
pr = infer_pr(args.pr, args.url, repo)
out = args.out or Path(tempfile.gettempdir()) / f"gh-pr-review-fix-{repo.replace('/', '_')}-{pr}.json"
cmd = [
"/home/bjorn/.codex/skill-support/bin/review-pack",
"fetch-pr",
"--repo",
repo,
"--pr",
str(pr),
"--out",
str(out),
]
subprocess.run(cmd, check=True)
print(json.dumps({"repo": repo, "pr": pr, "bundle": str(out)}))
return 0
if __name__ == "__main__":
raise SystemExit(main())