Skip to content
Agentmart
Submit a tool

greploop

Loop a PR through Greptile review until 5/5 confidence with zero unresolved comments.

Skill by greptileai

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jorgesolerrr-greploop

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Loop a PR through Greptile review until 5/5 confidence with zero unresolved comments.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/greploop

Tools it pre-approves 2

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(gh:*)
  • Bash(git:*)

What's inside

Skill name
greploop
Description
Loop a PR through Greptile review until 5/5 confidence with zero unresolved comments.
License
MIT
Compatibility
Requires git and gh (GitHub CLI) authenticated, and Greptile installed on the repo.
Allowed tools
Bash(gh:*), Bash(git:*)
Metadata
author: greptileai · version: 1.3
Instructions
219 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (5)

  • CREDITS.md
  • LICENSE
  • SKILL.md
  • openai.yaml · agents/
  • graphql-queries.md · references/

SKILL.md (first lines)

# Greploop

Iteratively fix a PR until Greptile gives a perfect review: 5/5 confidence, zero unresolved comments.

## Inputs

- **PR number** (optional): If not provided, detect the PR for the current branch.

## Instructions

### 1. Identify the PR

```bash
gh pr view --json number,headRefName,headRefOid
```

Switch to the PR branch if not already on it.

Key fields: `number`, `headRefName`, `headRefOid`.

### 2. Loop

Repeat the following cycle. **Max 5 iterations** to avoid runaway loops.

#### A. Trigger Greptile review

Push the latest changes (if any):

```bash
git push
```

Check if Greptile is already running before posting a new trigger comment:

```bash
GREPTILE_STATE=$(gh pr checks <PR_NUMBER> --json name,state --jq '.[] | select(.name | test("greptile"; "i")) | .state')
```

If Greptile is **not** already running (`PENDING` or `IN_PROGRESS`), request a fresh review:

```bash
if [ "$GREPTILE_STATE" != "PENDING" ] && [ "$GREPTILE_STATE" != "IN_PROGRESS" ]; then
  gh pr comment <PR_NUMBER> --body "@greptile review"
fi
```

Then poll for the Greptile check run to complete. The loop runs up to 10 minutes, so run this block with a 600000 ms timeout (or in the background):

```bash
HEAD_SHA=$(gh pr view <PR_NUMBER> --json headRefOid -q .headRefOid)
ATTEMPTS=0
MAX_ATTEMPTS=60
POLL_INTERVAL_SECONDS=10

while true; do
  ATTEMPTS=$((ATTEMPTS + 1))
  if [ "$ATTEMPTS" -gt "$MAX_ATTEMPTS" ]; then
    echo "Timed out waiting for the Greptile check run after approximately 10 minutes." >&2
    exit 1
  fi

  GREPTILE_CHECK=$(gh api "repos/{owner}/{repo}/commits/$HEAD_SHA/check-runs" \
    --jq '.check_runs[] | select(.name | test("greptile"; "i")) | "\(.status // "completed") \(.conclusion // "pending")"' 2>/dev/null)

  if [ -z "$GREPTILE_CHECK" ]; then
    echo "Waiting for Greptile check to appear..."
    sleep "$POLL_INTERVAL_SECONDS"
    continue
  fi

  read -r STATUS CONCLUSION <<< "$GREPTILE_CHECK"

  if [ "$STATUS" = "completed" ]; then
    if [ "$CONCLUSION" = "success" ]; then
      echo "Greptile check passed!"
    else
      echo "Greptile check completed with: $CONCLUSION"
    fi
    break
  fi

  echo "Waiting for Greptile... (status: $STATUS)"
  sleep "$POLL_INTERVAL_SECONDS"
done
```

If polling times out, stop the greploop workflow and report the timeout. Do not continue with stale or missing review results.

#### B. Fetch Greptile review results

Greptile may surface its score in several places — check **all** of them:

**1. PR description (body):**
```bash
gh pr view <PR_NUMBER> --json body -q '.body'
```

**2. General PR comments (issue comments):**
```bash
gh api --paginate "repos/{owner}/{repo}/issues/<PR_NUMBER>/comments?per_page=100"
```

Filter for Greptile-authored comments and use the body from the most recently updated comment (`updated_at`), not the most recently created comment. Greptile may edit the same general PR comment on each review cycle; parse the current body, including the "Prompt to fix all with AI" section, before deciding there are no remaining issues.

**3. PR reviews:**
```bash
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/reviews
```

Look for the most recent entry from `greptile-apps[bot]` or `greptile-apps-staging[bot]`.

Parse the text for:
- **Confidence score**: a pattern like `3/5` or `5/5` (or `Confidence: 3/5`).
- **Comment count**: Number of inline review comments noted in the summary.

**4. Unresolved review threads** (`gh` fills `{owner}` and `{repo}`; see [GraphQL reference](references/graphql-queries.md)):
```bash
gh api graphql --paginate -F owner='{owner}' -F repo='{repo}' -F pr=<PR_NUMBER> -f query='
query($owner: String!, $repo: String!, $pr: Int!, $endCursor: String) {

From jorgesolerrr/skills, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 12, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.3
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from greptileai

Cite this page

greploop skill. Agent Mart. https://agentmart.dev/skills/jorgesolerrr-greploop (last updated 2026-10-24)