원클릭으로
resolve-pr-parallel
Resolve PR review comments in parallel
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Resolve PR review comments in parallel
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Recover context from a dead or exhausted session
Check plugin version status — source vs installed vs release
Enhance plans with parallel research agents
Execute work plans using subagent dispatch
Manage session worktrees — resume, cleanup, rename, switch, create
Retry a deferred worktree merge — used when compact-prep's merge couldn't complete
| name | resolve-pr-parallel |
| description | Resolve PR review comments in parallel |
| argument-hint | [optional: PR number or current PR] |
| disable-model-invocation | true |
| allowed-tools | Bash(gh *), Bash(git *), Read |
Resolve all unresolved PR review comments by spawning parallel agents for each thread.
Claude Code automatically detects git context:
Fetch unresolved review threads using the GraphQL script:
bash ${CLAUDE_SKILL_DIR}/scripts/get-pr-comments PR_NUMBER
This returns only unresolved, non-outdated threads with file paths, line numbers, and comment bodies.
If the script fails, fall back to:
gh pr view PR_NUMBER --json reviews,comments
gh api repos/{owner}/{repo}/pulls/PR_NUMBER/comments
Create a TodoWrite list of all unresolved items grouped by type:
Resolve main root for .workflows/ paths: Run git worktree list --porcelain | head -1 | sed 's/^worktree //' to get the main repo root. Set WORKFLOWS_ROOT=<main-root>/.workflows. All .workflows/ paths in this skill use $WORKFLOWS_ROOT, NOT relative .workflows/. This ensures artifacts survive worktree lifecycle transitions and are shared across sessions.
Before dispatching agents, determine the run number and create the output directory:
First, count existing runs:
ls -d $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-* 2>/dev/null | wc -l | tr -d ' '
Read the output as the existing run count. Add 1 to get the new run number. Then create the output directory:
mkdir -p $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-RUN_NUM/
Replace PR_NUMBER with the actual PR number.
Spawn a pr-comment-resolver agent for each unresolved item in parallel. Each agent MUST include OUTPUT INSTRUCTIONS that direct output to disk.
If there are 3 comments, spawn 3 agents:
Task pr-comment-resolver (run_in_background: true): " [comment 1 context: thread ID, file path, line number, comment body]
=== OUTPUT INSTRUCTIONS (MANDATORY) === Write your complete Comment Resolution Report to: $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-N/comment-1.md Include the thread ID and all changed file paths in your report. After writing the file, return ONLY a 2-3 sentence summary including the thread ID and changed file paths. "
Task pr-comment-resolver (run_in_background: true): " [comment 2 context: thread ID, file path, line number, comment body]
=== OUTPUT INSTRUCTIONS (MANDATORY) === Write your complete Comment Resolution Report to: $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-N/comment-2.md Include the thread ID and all changed file paths in your report. After writing the file, return ONLY a 2-3 sentence summary including the thread ID and changed file paths. "
Task pr-comment-resolver (run_in_background: true): " [comment 3 context: thread ID, file path, line number, comment body]
=== OUTPUT INSTRUCTIONS (MANDATORY) === Write your complete Comment Resolution Report to: $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-N/comment-3.md Include the thread ID and all changed file paths in your report. After writing the file, return ONLY a 2-3 sentence summary including the thread ID and changed file paths. "
Replace PR_NUMBER with the actual PR number and N with the run number from step 3a.
DO NOT call TaskOutput to retrieve full results. The files on disk ARE the results.
Poll for file existence to track completion:
ls $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-N/
Compare the files present against the expected list (one comment-*.md per dispatched agent). When all expected files exist, proceed to step 4.
If an agent hasn't produced output after 3 minutes, mark it as timed out and proceed with the completed results.
Use the agent summaries (which include thread IDs and changed file paths) to commit and resolve:
$WORKFLOWS_ROOT/scratch/commit-msg-resolve-pr-<PR_NUMBER>.txt, then run git commit -F $WORKFLOWS_ROOT/scratch/commit-msg-resolve-pr-<PR_NUMBER>.txt.bash ${CLAUDE_SKILL_DIR}/scripts/resolve-pr-thread THREAD_ID
If additional detail is needed beyond the summaries, read the resolution reports from disk:
cat $WORKFLOWS_ROOT/resolve-pr/PR_NUMBER/agents/run-N/comment-1.md
Resolution reports are typically ~20 lines each — reading them is acceptable when needed for commit message crafting or verifying resolution details.
Re-fetch comments to confirm all threads are resolved:
bash ${CLAUDE_SKILL_DIR}/scripts/get-pr-comments PR_NUMBER
Should return an empty array []. If threads remain, repeat from step 1.