pr-review-loop
PR Review Loop
Streamline the push-review-fix cycle for PRs with automated reviewers like Gemini Code Assist.
CRITICAL: Git Command Restrictions
YOU DO NOT HAVE PERMISSION TO USE RAW GIT COMMANDS.
| Forbidden | Use Instead |
|---|---|
git commit |
commit-and-push.sh "msg" |
git push |
commit-and-push.sh "msg" |
All scripts are in ~/.claude/skills/pr-review-loop/scripts/.
When to Use
Invoke when user:
- Pushes changes and waits for CI/reviews
- Says "new reviews available" or "check PR feedback"
- Iterates on review feedback from Gemini or other reviewers
- Wants to monitor PR status
- Asks to address reviewer comments
Core Workflow
1. Get unresolved comments (--wait to poll 5 min)
2. For EACH comment: fix OR skip, then REPLY
3. Commit using commit-and-push.sh (NEVER raw git)
4. Trigger next review with trigger-review.sh --wait
5. Repeat until no new issues
6. One final loop, then ask about merge
Step-by-step Commands
1. Check for comments:
~/.claude/skills/pr-review-loop/scripts/summarize-reviews.sh <PR>
~/.claude/skills/pr-review-loop/scripts/get-review-comments.sh <PR> --with-ids --wait
2. Reply to EVERY comment:
~/.claude/skills/pr-review-loop/scripts/reply-to-comment.sh <PR> <id> "Fixed - description"
~/.claude/skills/pr-review-loop/scripts/reply-to-comment.sh <PR> <id> "Won't fix - reason"
3. Commit and push:
~/.claude/skills/pr-review-loop/scripts/commit-and-push.sh "fix: description"
4. Trigger next review:
~/.claude/skills/pr-review-loop/scripts/trigger-review.sh <PR> --wait
Be Skeptical of Reviews
Not all suggestions are good. Evaluate critically:
- Does this improve the code, or is it pedantic?
- Is this appropriate for the project context?
- Would this add unnecessary complexity?
Skip suggestions that are:
- Platform-specific when not applicable
- Overly defensive (excessive null checks)
- Stylistic preferences not matching project
- Documentation for self-explanatory code
When in doubt, ask the user.
One More Loop Rule
When all comments are resolved:
- Track in TodoWrite: "Final verification loop"
- Trigger one more review cycle
- If no actionable feedback → ask about merge
- If new fixes needed → remove todo, do fresh "one more" after
Gemini Rate Limit Fallback
When Gemini hits daily quota, use Claude:
~/.claude/skills/pr-review-loop/scripts/trigger-review.sh <PR> --claude
# OR
~/.claude/skills/pr-review-loop/scripts/claude-review.sh <PR>
Then use Task tool with the generated prompt.
Scripts Quick Reference
| Script | Purpose |
|---|---|
commit-and-push.sh "msg" |
ALWAYS USE for commits |
reply-to-comment.sh <PR> <id> "msg" |
Reply and auto-resolve |
get-review-comments.sh <PR> --with-ids --wait |
Fetch comments |
trigger-review.sh <PR> --wait |
Trigger review cycle |
summarize-reviews.sh <PR> |
Summary by priority/file |
claude-review.sh <PR> |
Claude fallback prompt |
See references/scripts-reference.md for complete documentation.
Reply Templates
- Fixed: "Fixed - [description]"
- Won't fix: "Won't fix - [reason]"
- Deferred: "Good catch, tracking in #issue"
- Acknowledged: "Acknowledged - [explanation]"
Prerequisites
ghCLI authenticatedpre-commitinstalled (pip install pre-commit)- Pre-commit hooks in repo (
.pre-commit-config.yaml)
Permission Setup
Add to .claude/settings.local.json:
Bash(~/.claude/skills/pr-review-loop/scripts/commit-and-push.sh:*)
Bash(~/.claude/skills/pr-review-loop/scripts/reply-to-comment.sh:*)
Bash(~/.claude/skills/pr-review-loop/scripts/trigger-review.sh:*)
References
references/scripts-reference.md- Complete script documentationreferences/workflow-examples.md- End-to-end examples
More from leegonzales/aiskills
veo3-prompter
Craft professional video prompts for Google Veo 3.1 using cinematic techniques, audio direction, and timestamp choreography. Use when generating AI videos, creating video prompts, or working with Veo 3.
42goals-graph
Query and update Lee's goals graph through natural language. Translates conversational questions and updates into goals_query.py commands.
19codebase-navigator
Semantic code search using osgrep for understanding codebases, finding implementations, and navigating large projects. Use when asked "where is", "how does", "find the code that", or any question about code location or implementation.
6writing-partner
Collaborative essay writing that preserves authenticity through structured interview, thread tracking, and voice calibration. Transforms AI from text generator into intellectual prosthesis. Use when writing essays, blog posts, or any content where voice matters more than speed.
4prose-polish
Evaluate and elevate writing effectiveness through multi-dimensional quality assessment. Analyzes craft, coherence, authority, purpose, and voice with genre-calibrated thresholds. Use for refining drafts, diagnosing quality issues, generating quality content, or teaching writing principles.
4claude-project-docs
Generate concise CLAUDE.md files and agent documentation following best practices. Use when setting up a new project for Claude Code, auditing existing CLAUDE.md, or creating progressive disclosure documentation structure.
3