From pr-review
Manages GitHub PR review comments. Use when the user asks to "list PR comments", "check PR feedback", "respond to PR comments", "address reviewer feedback", "fix PR review issues", "work through PR review", or "acknowledge comments". Handles both quick lookups and full review-response workflows.
npx claudepluginhub fzymgc-house/fzymgc-house-skills --plugin pr-reviewThis skill is limited to using the following tools:
- [VCS Detection](#vcs-detection)
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Follow the procedure in pr-review/references/vcs-detection-preamble.md to
detect git vs jj and verify your location. Use gh CLI for GitHub
operations regardless of VCS.
Execute the bundled script using the full absolute path from your allowed-tools Bash pattern. The script outputs ready-to-run commands with its own absolute path — copy-paste those directly.
scripts/pr_comments list <pr> [--unacked] # List comments
scripts/pr_comments get <pr> <id> [--save <p>] # Get comment
scripts/pr_comments latest <pr> # Most recent
scripts/pr_comments ack <pr> <id> # Acknowledge
scripts/pr_comments comment <pr> --file <path> # Post comment
scripts/pr_comments comment <pr> "text" # Post inline
Comment IDs: RC_* = review comment (inline on code), R_* = review (approve/request/comment).
Quick lookup (e.g., "list PR comments", "check what reviewers said"): Run the relevant command above and present the output. Done.
Full workflow (e.g., "address PR feedback", "fix PR review issues"): Follow the workflow below.
Copy this checklist and update as you go:
- [ ] Phase 1: Read unacked comments, query beads for prior findings, cross-reference, locate worktree
- [ ] Phase 2: Categorize comments, confirm with user
- [ ] Phase 3: Implement fixes, update beads (close findings, create work beads)
- [ ] Phase 4: All quality gates pass (test, build, lint)
- [ ] Phase 5: Commit, push, post bead-based summary comment
Verify bd is available: run bd --version. If it fails, stop and
tell the user: "beads CLI (bd) is required but not found. Install
beads and run bd init in the target project."
Identify the PR. Use $ARGUMENTS if provided, otherwise determine
from context or ask.
Read all unresolved comments: list <pr-number> --unacked.
If none exist, report and stop.
Query beads for prior review findings. Check if a review-pr run previously created beads for this PR:
bd list --label "pr-review,pr:<number>" --json
If a review bead exists, load all child findings:
bd list --parent <review-bead-id> --json
This provides full context from prior review-pr runs without re-deriving from PR comment text.
Cross-reference. Match GitHub PR comments against existing finding
beads via external-ref URLs. Identify:
Gather review history. Fetch all prior reviews and comments to understand the full conversation context:
gh api repos/{owner}/{repo}/pulls/<number>/reviews
gh api repos/{owner}/{repo}/pulls/<number>/comments
Note which review round this is (first review, re-review after fixes, etc.) and whether previously flagged issues were resolved. Pass this context to sub-agents in Phase 3 so they understand what was already attempted.
Locate the worktree. Worktrees are in the sibling
<repo>_worktrees/ directory.
git worktree list and check whether one exists for
the PR's branch. If one matches, cd into it and verify with
git branch --show-current._worktrees/
sibling directory using case "$(pwd)" in *_worktrees/*) ....
Do NOT rely on jj workspace list output to identify the
current workspace (jj 0.39+ has no (current) marker).
If no worktree matches, ask the user whether to create one.MUST use an existing worktree if one matches.
This phase has three distinct steps. Do NOT combine them.
Step 2a — Categorize internally. For each comment, assign a category, complexity, and model. Do not present to the user yet.
If a PR comment matches an existing finding bead (from the cross-reference in Phase 1), note the finding bead ID for linking in Phase 3.
| Category | Description | Action |
|---|---|---|
| bug | Logic error, missing edge case | Fix |
| style | Naming, formatting, lint issues | Fix |
| feature | New functionality request | Ask |
| design | Architecture, pattern, API shape | Ask |
| question | Clarification, "why did you..." | Ask |
| Complexity | Criteria | Model |
|---|---|---|
| low | Single file, mechanical change, obvious fix | sonnet |
| medium | Few files, some judgment, clear approach | sonnet |
| high | Cross-cutting, architectural, needs context | sonnet |
Escalate to opus when:
Step 2b — Gather clarifications. For every comment categorized as feature, design, or question: present it to the user one at a time with full context (comment text, file location, surrounding code). Ask exactly one question per comment. Wait for the user's response before presenting the next. Record each answer.
Step 2c — Present plan for approval. Show the full categorized list to the user in a single summary:
Ask the user to confirm or adjust before proceeding. Do NOT begin implementation until the user approves.
Dispatch each fix/response as a sub-agent using the Task tool with the model from Phase 2. Each sub-agent should receive:
Concurrency limit: at most 3 sub-agents at a time. If more than 3 fixes are independent, batch them into groups of 3 and wait for each batch to finish before launching the next.
Bug and style: launch sub-agent with recommended model.
bd create "Fix: <description>" --type task --deps "discovered-from:<finding-bead-id>" --silentbd update <finding-bead-id> --status closedack <pr> <comment-id>Feature, design, question: launch sub-agent with recommended model and the user's guidance from Step 2b.
ack <pr> <comment-id>Launch a sonnet sub-agent to run quality gates and fix any failures:
Taskfile.yml, build.gradle, pyproject.toml, Cargo.toml, package.json, etc.task test && task test:integration && task build && task lintpytest tests/ && pytest tests/integration/ && python -m build && ruff checkcargo test && cargo test --test integration && cargo build && cargo clippy./gradlew test integrationTest build checknpm test && npm run test:integration && npm run build && npm run lintTrigger when ANY of these conditions apply:
Launch a sonnet sub-agent (independent context) to review. Sub-agent outputs ONLY structured results (no explanations) to minimize token use:
Sub-agent task:
Read Phase 2 categorization (comment IDs, categories, user guidance)
Query beads for review state: bd list --parent <review-bead-id> --json
Run VCS diff to see actual changes (git diff or jj diff)
For EACH comment ID, output one line:
<comment-id>: PASS | FAIL: <reason-if-fail>
After all comments, output decision:
DECISION: SHIP | BLOCK
BLOCK_REASON: <one-line-summary-if-blocked>
Example output:
RC_123: PASS
RC_456: FAIL: Test added but doesn't cover edge case mentioned in comment
R_789: PASS
DECISION: BLOCK
BLOCK_REASON: RC_456 test incomplete
If DECISION is BLOCK, return to Phase 3 to address flagged issues, then re-run Phase 4 gates. If DECISION is SHIP, proceed to Phase 5.
Commit using the commit-commands:commit skill.
Push to the PR branch.
Post summary comment using the bead-based template:
Write to /tmp/pr-response-comment.md and post via
comment <pr-number> --file /tmp/pr-response-comment.md
Template:
<!-- pr-review:<bead-id>:response -->
## <bead-id> — Review Response
`bd list --parent <bead-id>`
Addressed N/M · N deferred
| Finding | Status |
|---------|--------|
| <bead-id> | Fixed |
| <bead-id> | Deferred — reason |
The HTML comment marker enables machine detection of response comments.
| Constraint | Reason |
|---|---|
| MUST NOT close epic | PR merge triggers closure |
| MUST NOT close issue | PR merge triggers closure |
| MUST NOT merge the PR | Reviewer's decision |
| MUST use worktree | Avoid branch conflicts |
| MUST ask for feat/design | Require human judgment |
| MUST use TDD for fixes | Ensures correctness |
--unacked filters by +1 reaction from the authenticated user.--file for multi-line comments (avoids shell escaping).