# Send PR Review Loop to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pr-review-loop",
    "name": "PR Review Loop",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/cemoso/pr-review-loop",
    "canonicalUrl": "https://clawhub.ai/cemoso/pr-review-loop",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/pr-review-loop",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pr-review-loop",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/greptile-patterns.md",
      "scripts/pr-review-loop.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "pr-review-loop",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T02:00:02.998Z",
      "expiresAt": "2026-05-10T02:00:02.998Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pr-review-loop",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pr-review-loop",
        "contentDisposition": "attachment; filename=\"pr-review-loop-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "pr-review-loop"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pr-review-loop"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pr-review-loop",
    "downloadUrl": "https://openagent3.xyz/downloads/pr-review-loop",
    "agentUrl": "https://openagent3.xyz/skills/pr-review-loop/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pr-review-loop/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pr-review-loop/agent.md"
  }
}
```
## Documentation

### PR Review Loop

Autonomous cycle: Greptile reviews PR → agent fixes feedback → pushes → re-triggers → repeats until score ≥ 4/5 or max rounds.

### Quick Start

When triggered with a PR URL or review payload:

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

Or invoke steps manually — see below.

### 1. Fetch Review

# Get latest Greptile review
gh api "/repos/{owner}/{repo}/pulls/{pr}/reviews" \\
  --jq '[.[] | select(.user.login == "greptile-apps[bot]")] | last'

# Get inline comments
gh api "/repos/{owner}/{repo}/pulls/{pr}/comments" \\
  --jq '[.[] | select(.user.login == "greptile-apps[bot]")]'

### 2. Parse Score

Look for confidence/quality score in review body. Greptile typically includes a score like Score: X/5 or Confidence: X/5. Extract it:

Score ≥ 4/5 → auto-merge
Score < 4/5 → fix issues
No score found → treat as needing fixes if there are comments, otherwise merge

### 3. Auto-Merge (score ≥ 4)

gh pr merge <number> --merge --delete-branch --repo <owner/repo>

### 4. Fix Issues (score < 4)

For each Greptile comment:

Read the file and line referenced
Understand the feedback
Apply the fix
Stage changes

Commit with a descriptive message listing each fix:

Address Greptile review feedback (round N)

- Fix X in path/to/file.ts
- Fix Y in path/to/other.ts
- Improve Z per reviewer suggestion

Push and re-trigger:

git push
gh pr comment <number> --repo <owner/repo> --body "@greptileai review"

### 5. Track State

Maintain review-state.json in workspace:

{
  "owner/repo#123": {
    "rounds": 2,
    "maxRounds": 5,
    "lastScore": 3,
    "sameScoreCount": 1
  }
}

Update after each round. Check exit conditions:

rounds ≥ 5 → merge anyway, notify Master
sameScoreCount ≥ 2 (same score 2 rounds in a row) → merge anyway, notify Master

### 6. Escalation

Architectural decisions (review mentions architecture, design patterns, breaking changes) → ping Master on Telegram, don't auto-fix
Max rounds reached → merge + notify Master with summary
Unclear feedback → ask Master

### Command Interface

Agents should respond to:

pr review <url> — start review loop on a PR
pr review <owner/repo#number> — same, by reference
pr status — show active review loops and their state

### References

See references/greptile-patterns.md for common Greptile feedback patterns and fix strategies.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: cemoso
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T02:00:02.998Z
- Expires at: 2026-05-10T02:00:02.998Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/pr-review-loop)
- [Send to Agent page](https://openagent3.xyz/skills/pr-review-loop/agent)
- [JSON manifest](https://openagent3.xyz/skills/pr-review-loop/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/pr-review-loop/agent.md)
- [Download page](https://openagent3.xyz/downloads/pr-review-loop)