PR Review Loop for Openclaw

An autonomous workflow that uses Greptile to review code, apply fixes, and merge PRs when quality scores meet your criteria.

cemoso
v1.0.0
Feb 13, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install pr-review-loop

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install pr-review-loop using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PR Review Loop?

The PR Review Loop is a powerful automation skill designed for AI agents to handle the end-to-end pull request lifecycle. By integrating with Greptile, this Openclaw Skills extension allows an agent to submit code, receive professional-grade feedback, and iteratively fix issues until the code reaches a high-quality score. It bridges the gap between manual human review and fully autonomous development by ensuring every PR meets a specific quality threshold before merging.

This skill is essential for maintaining code quality without slowing down the development cycle. It uses the GitHub CLI to interact with repositories, fetching comments and scores directly from the API. Whether you are running a single-agent project or a complex multi-agent system, the PR Review Loop ensures that code standards are met consistently across all contributions.

PR Review Loop Use Cases

  • Automated code quality assurance for agent-generated pull requests.
  • Continuous integration workflows where manual review is the bottleneck.
  • High-velocity development cycles requiring autonomous fix-and-verify loops.
  • Standardizing code review scores across multiple repositories using Openclaw Skills.

How PR Review Loop Works

  1. The skill is triggered via a PR URL or a webhook delivery from a Greptile review.
  2. The agent fetches the latest review data and inline comments using the GitHub API.
  3. A quality score is extracted from the review body (typically out of 5).
  4. If the score is 4 or higher, the agent automatically merges the PR and deletes the branch.
  5. If the score is lower than 4, the agent parses each comment, applies the necessary code changes, and pushes a new commit.
  6. The agent re-triggers the Greptile review and repeats the process until the target score is met or maximum rounds are reached.

PR Review Loop Setup

To get started with this skill within your Openclaw Skills ecosystem, ensure you have the GitHub CLI installed and authenticated.

# Ensure GitHub CLI is authenticated
gh auth status

# Run the review loop on a specific PR
bash scripts/pr-review-loop.sh <owner/repo> <pr-number>

You should also have Greptile configured to monitor your repository and provide feedback patterns as defined in your references.

PR Review Loop Data Schema & Taxonomy

The skill maintains a local state file called review-state.json to track progress across multiple review cycles and prevent infinite loops.

Property Description
rounds The current number of fix-and-review cycles completed.
maxRounds The limit of autonomous attempts (default is 5).
lastScore The numerical quality score from the previous Greptile review.
sameScoreCount Tracks if the quality score has plateaued to trigger escalation.

PR Review Loop Advanced Features

  • Intelligent escalation to a human Master for complex architectural or design pattern decisions.
  • Auto-merge thresholds to ensure only high-quality code reaches the main branch.
  • Persistence tracking via JSON state files to manage agent resources and session history.
  • Integration with external notification systems like Telegram for reporting max-round failures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*