원클릭으로
pr-loop
Review, commit, create PR, then auto-address review comments in a loop.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review, commit, create PR, then auto-address review comments in a loop.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | pr-loop |
| description | Review, commit, create PR, then auto-address review comments in a loop. |
| argument-hint | [--wait 300] [--max 5] |
| disable-model-invocation | true |
Review code, create PR, then automatically address review comments.
Parse $ARGUMENTS for options:
--wait N → seconds between checks (default: 300)--max N → max review-loop iterations (default: 5)Important: All gh CLI commands require required_permissions: ['all'] due to TLS certificate issues in sandboxed mode.
NEVER include PII in commits, PR titles/descriptions, branch names, or code comments. PII includes: names, email addresses, phone numbers, addresses, usernames, account IDs, API keys, tokens, passwords, or any sensitive personal data. Commit messages describe the type of change, not specific data. Use generic terms like "user", "email", "record".
──────────
Append these to the existing task list (do NOT replace tasks already there from earlier work):
──────────
Use the Task tool to spin up a review subagent:
Task tool call:
subagent_type: "general-purpose"
description: "Review code changes"
prompt: <see below>
Subagent prompt must include:
git diff HEAD (or git diff --cached if there are staged changes).claude/skills/review/SKILL.md (categories, severity guide, project-specific checks)──────────
Read the subagent's output. For each finding:
If the subagent already auto-fixed [AUTO] items, verify they were applied.
──────────
Follow the .claude/skills/create-pr/SKILL.md workflow:
Check state:
git branch --show-current && git status -s && git diff HEAD --stat
Create branch if on main:
git checkout -b feat/<description> # or fix/ or chore/
Stage specific files (NOT git add .), commit, push:
git add <file1> <file2> ... && git commit -m "<generic message>" && git push -u origin <branch>
Create PR:
gh pr create --title "<feature_area>: <Title>" --body "<TLDR + bullets>"
Display the PR URL as [PR #<number>](<url>) and the branch name.
──────────
Repeat up to --max iterations (default 5):
sleep <wait-seconds>
Default: 300 seconds (5 minutes).
Fetch all comments and check reviewer status:
PR_NUM=$(gh pr view --json number --jq .number)
REPO=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
# Fetch code review comments
gh api "repos/$REPO/pulls/$PR_NUM/comments" --jq '.[] | {id, body: .body[0:200], author: .user.login, created_at}'
# Fetch conversation comments
gh pr view --json comments --jq '.comments[] | {id, body, author: .author.login}'
# Check if reviewer checks are still running
gh pr checks $PR_NUM
Exit conditions — only exit if ALL are true:
gh pr checks and verify no reviewer checks (e.g. "Baz Reviewer", "cubic · AI code reviewer") are pending or in_progress. If any reviewer check is still running, they haven't finished posting comments yet — wait for the next iteration.If any condition is false, continue the loop.
Fetch code review comments:
.claude/skills/scripts/get-pr-review-comments.sh
Fetch conversation comments:
gh pr view --json comments --jq '.comments[] | {id, body, author: .author.login}'
For each comment:
# Reply to code review comment
gh api repos/$REPO/pulls/$PR_NUM/comments/$COMMENT_ID/replies -f body="<reply>"
# Reply to conversation comment
gh pr comment $PR_NUM --body "<reply>" --reply-to $COMMENT_ID
Critical rules:
After addressing all comments in this iteration:
git add <changed-files> && git commit -m "<generic message about addressing review feedback>" && git push
Go back to step 5a. Exit when:
Guidelines for testing the application with Vitest, including unit tests, integration tests (emulator), AI tests, and eval suites for LLM features
Cursor Cloud VM setup and service startup instructions for local development
Guidelines for implementing LLM (Language Model) functionality in the application
Simplify and refine recently modified code for clarity, consistency, and maintainability while preserving exact behavior. Use when asked to simplify, polish, refactor lightly, or clean up current-session changes before review or PR.
Commit changes and open a pull request with safe metadata
Review prompt and tool-description changes in a branch or PR. Use when asked to audit system prompts, prompt builders, tool descriptions, prompt inputs, or nearby evals/tests; summarize what changed; identify guidance that feels eval-shaped or too heavy for product use; and find repeated instructions between the main prompt and tool descriptions.