Get the FREE Ultimate OpenClaw Setup Guide →

review-loop

Scanned
npx machina-cli add skill lklimek/claudius/review-loop --openclaw
Files (1)
SKILL.md
3.4 KB

Peer Review Loop

Autonomous loop for addressing peer review feedback on a pull request. Repeats until the reviewer has no new actionable comments.

User Confirmation

Before starting the loop, present the user with a summary of what this skill will do (request review, wait for feedback, apply fixes, commit, push, and re-request — potentially multiple iterations) and ask for explicit permission to proceed. Do not begin the loop until the user confirms.

Prerequisites

  • A pull request already exists on GitHub
  • Changes are pushed to the remote branch
  • The reviewer is specified (default: copilot)

Loop Steps

1. Request review

Request review from the specified reviewer. See the github skill (PR Review Comments > Requesting reviewers section) for the wrapper script.

2. Wait for review completion

Poll until a new review appears. Use the gh-fetch-reviews.sh wrapper from the github skill (PR Review Comments section). Reviews are ordered by submitted_at; compare against the last known review ID to detect new ones.

  • Track the latest review ID before requesting. A new review has a higher ID.
  • Timeout after ~10 minutes of polling — inform the user if no review arrives.

3. Read review comments

Fetch inline comments associated with the latest review. See the github skill (PR Review Comments > Fetching inline review comments section) for the wrapper script.

  • Filter comments by the new review's ID to avoid re-processing stale comments from earlier reviews.
  • Distinguish actionable comments (code suggestions, requested changes) from informational ones (praise, acknowledgments).

4. Evaluate comments

For each new comment:

  • If the issue is already fixed in the current code (stale comment from before a force-push), skip it.
  • If the comment is not actionable (e.g., "looks good", informational), skip it.
  • If the comment identifies a real issue, fix it.

If no actionable comments remain → exit the loop successfully.

5. Fix issues

  • Apply the necessary code changes.
  • Run the project's test suite locally to verify fixes don't break anything.
  • If the fix changes behavior described in the PR, update the PR description.

6. Push fixes

git add <changed-files>
git commit -m "<type>: address review feedback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
git push

7. Re-request review

Go back to Step 1 and repeat.

Exit conditions

  • Success: The latest review has no new actionable comments.
  • Timeout: No new review appears within ~10 minutes of polling.
  • Error: Push or test failure that cannot be resolved automatically — inform the user.

Notes

  • Always filter comments by review ID to avoid re-addressing already-fixed issues from prior review rounds.
  • After force-pushes, old inline comments may appear on outdated diffs — verify against current code before acting.
  • If the reviewer requests changes that conflict with the PR's intent, flag it to the user rather than making the change autonomously.
  • Update the PR description if review feedback reveals missing context (e.g., unrelated fixes bundled into the PR).

Source

git clone https://github.com/lklimek/claudius/blob/main/skills/review-loop/SKILL.mdView on GitHub

Overview

This skill autonomously manages peer review on a GitHub pull request. It requests reviews, waits for new feedback, fixes issues, commits and pushes, and repeats until there are no new actionable comments.

How This Skill Works

After user confirmation, it uses the github skill wrappers (e.g., gh-fetch-reviews.sh) to request a review, poll for new reviews (timeout ~10 minutes), and fetch inline comments. It filters comments by the latest review ID to identify new, actionable issues, applies fixes, runs tests locally, and updates the PR description if needed. It then commits and pushes changes and re-requests a review, looping until no new actionable comments remain.

When to Use It

  • You have a PR that needs multiple rounds of feedback from one or more reviewers
  • You want to automatically re-request reviews after fixes are pushed
  • You aim to ensure all actionable comments are addressed before merging
  • Reviewers frequently add comments over time and you want continuous iteration
  • The PR uses a default reviewer (e.g., copilot) and requires coordinated rechecks

Quick Start

  1. Step 1: Provide the PR URL, the reviewer (default copilot), and the target branch; obtain explicit user confirmation to begin
  2. Step 2: The skill requests a review, then polls for new feedback for up to ~10 minutes, fetching new comments by review ID
  3. Step 3: For each actionable comment, apply fixes, run tests, push changes, and re-request the review until no new actionable comments remain

Best Practices

  • Confirm prerequisites and explicit user permission before starting
  • Track the latest review ID to filter only new comments
  • Differentiate actionable issues from informational praise
  • Run the project's test suite locally after applying fixes
  • Update the PR description if behavior changes or scope shifts

Example Use Cases

  • Bug fix PR with multiple inline review comments resolved through iterative fixes
  • Feature PR where reviewers request several changes across files
  • PR requiring test updates after changes in core logic
  • PR with late comments after initial submission requiring additional iterations
  • Collaborative PR on a fork with multiple reviewers and re-pushes

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers