{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/pr-review-loop",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pr-review-loop",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/greptile-patterns.md",
      "scripts/pr-review-loop.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/pr-review-loop",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "PR Review Loop",
        "body": "Autonomous cycle: Greptile reviews PR → agent fixes feedback → pushes → re-triggers → repeats until score ≥ 4/5 or max rounds."
      },
      {
        "title": "Quick Start",
        "body": "When triggered with a PR URL or review payload:\n\n# Run the review loop\nbash scripts/pr-review-loop.sh <owner/repo> <pr-number>\n\nOr invoke steps manually — see below."
      },
      {
        "title": "1. Fetch Review",
        "body": "# Get latest Greptile review\ngh api \"/repos/{owner}/{repo}/pulls/{pr}/reviews\" \\\n  --jq '[.[] | select(.user.login == \"greptile-apps[bot]\")] | last'\n\n# Get inline comments\ngh api \"/repos/{owner}/{repo}/pulls/{pr}/comments\" \\\n  --jq '[.[] | select(.user.login == \"greptile-apps[bot]\")]'"
      },
      {
        "title": "2. Parse Score",
        "body": "Look for confidence/quality score in review body. Greptile typically includes a score like Score: X/5 or Confidence: X/5. Extract it:\n\nScore ≥ 4/5 → auto-merge\nScore < 4/5 → fix issues\nNo score found → treat as needing fixes if there are comments, otherwise merge"
      },
      {
        "title": "3. Auto-Merge (score ≥ 4)",
        "body": "gh pr merge <number> --merge --delete-branch --repo <owner/repo>"
      },
      {
        "title": "4. Fix Issues (score < 4)",
        "body": "For each Greptile comment:\n\nRead the file and line referenced\nUnderstand the feedback\nApply the fix\nStage changes\n\nCommit with a descriptive message listing each fix:\n\nAddress Greptile review feedback (round N)\n\n- Fix X in path/to/file.ts\n- Fix Y in path/to/other.ts\n- Improve Z per reviewer suggestion\n\nPush and re-trigger:\n\ngit push\ngh pr comment <number> --repo <owner/repo> --body \"@greptileai review\""
      },
      {
        "title": "5. Track State",
        "body": "Maintain review-state.json in workspace:\n\n{\n  \"owner/repo#123\": {\n    \"rounds\": 2,\n    \"maxRounds\": 5,\n    \"lastScore\": 3,\n    \"sameScoreCount\": 1\n  }\n}\n\nUpdate after each round. Check exit conditions:\n\nrounds ≥ 5 → merge anyway, notify Master\nsameScoreCount ≥ 2 (same score 2 rounds in a row) → merge anyway, notify Master"
      },
      {
        "title": "6. Escalation",
        "body": "Architectural decisions (review mentions architecture, design patterns, breaking changes) → ping Master on Telegram, don't auto-fix\nMax rounds reached → merge + notify Master with summary\nUnclear feedback → ask Master"
      },
      {
        "title": "Command Interface",
        "body": "Agents should respond to:\n\npr review <url> — start review loop on a PR\npr review <owner/repo#number> — same, by reference\npr status — show active review loops and their state"
      },
      {
        "title": "References",
        "body": "See references/greptile-patterns.md for common Greptile feedback patterns and fix strategies."
      }
    ],
    "body": "PR Review Loop\n\nAutonomous cycle: Greptile reviews PR → agent fixes feedback → pushes → re-triggers → repeats until score ≥ 4/5 or max rounds.\n\nQuick Start\n\nWhen triggered with a PR URL or review payload:\n\n# Run the review loop\nbash scripts/pr-review-loop.sh <owner/repo> <pr-number>\n\n\nOr invoke steps manually — see below.\n\nWorkflow\n1. Fetch Review\n# Get latest Greptile review\ngh api \"/repos/{owner}/{repo}/pulls/{pr}/reviews\" \\\n  --jq '[.[] | select(.user.login == \"greptile-apps[bot]\")] | last'\n\n# Get inline comments\ngh api \"/repos/{owner}/{repo}/pulls/{pr}/comments\" \\\n  --jq '[.[] | select(.user.login == \"greptile-apps[bot]\")]'\n\n2. Parse Score\n\nLook for confidence/quality score in review body. Greptile typically includes a score like Score: X/5 or Confidence: X/5. Extract it:\n\nScore ≥ 4/5 → auto-merge\nScore < 4/5 → fix issues\nNo score found → treat as needing fixes if there are comments, otherwise merge\n3. Auto-Merge (score ≥ 4)\ngh pr merge <number> --merge --delete-branch --repo <owner/repo>\n\n4. Fix Issues (score < 4)\n\nFor each Greptile comment:\n\nRead the file and line referenced\nUnderstand the feedback\nApply the fix\nStage changes\n\nCommit with a descriptive message listing each fix:\n\nAddress Greptile review feedback (round N)\n\n- Fix X in path/to/file.ts\n- Fix Y in path/to/other.ts\n- Improve Z per reviewer suggestion\n\n\nPush and re-trigger:\n\ngit push\ngh pr comment <number> --repo <owner/repo> --body \"@greptileai review\"\n\n5. Track State\n\nMaintain review-state.json in workspace:\n\n{\n  \"owner/repo#123\": {\n    \"rounds\": 2,\n    \"maxRounds\": 5,\n    \"lastScore\": 3,\n    \"sameScoreCount\": 1\n  }\n}\n\n\nUpdate after each round. Check exit conditions:\n\nrounds ≥ 5 → merge anyway, notify Master\nsameScoreCount ≥ 2 (same score 2 rounds in a row) → merge anyway, notify Master\n6. Escalation\nArchitectural decisions (review mentions architecture, design patterns, breaking changes) → ping Master on Telegram, don't auto-fix\nMax rounds reached → merge + notify Master with summary\nUnclear feedback → ask Master\nCommand Interface\n\nAgents should respond to:\n\npr review <url> — start review loop on a PR\npr review <owner/repo#number> — same, by reference\npr status — show active review loops and their state\nReferences\n\nSee references/greptile-patterns.md for common Greptile feedback patterns and fix strategies."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/cemoso/pr-review-loop",
    "publisherUrl": "https://clawhub.ai/cemoso/pr-review-loop",
    "owner": "cemoso",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}