greploop
Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.
Skill by greptileai
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/haseeb-heaven-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.
About
Reviews
Write a reviewNo 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 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(gh:*)Bash(glab:*)Bash(git:*)Bash(p4:*)
What's inside
- Skill name
greploop- Description
- Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers Greptile review, fixes all actionable comments, pushes/re-shelves, re-triggers review, and repeats. Use when the user wants to fully optimize a PR/MR/CL against Greptile's code review standards.
- License
- MIT
- Compatibility
- Requires git, gh (GitHub CLI) or glab (GitLab CLI) authenticated, and Greptile installed on the repo. For Perforce, requires p4 CLI authenticated.
- Allowed tools
- Bash(gh:*), Bash(glab:*), Bash(git:*), Bash(p4:*)
- Metadata
- author: greptileai · version: 1.2
- Instructions
- 410 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (3)
- SKILL.md
- gitlab-api.md · references/
- graphql-queries.md · references/
SKILL.md (first lines)
# Greploop
Iteratively fix a PR/MR/CL until Greptile gives a perfect review: 5/5 confidence, zero unresolved comments.
## Inputs
- **PR/MR/CL number** (optional): If not provided, detect the PR/MR for the current branch, or the default pending changelist for p4.
## Instructions
### 0. Detect platform
First check for Perforce, then fall back to git remote detection:
```bash
# Check for Perforce environment
if p4 info >/dev/null 2>&1; then
VCS="perforce"
else
REMOTE_URL=$(git remote get-url origin)
if echo "$REMOTE_URL" | grep -qi "gitlab"; then
VCS="gitlab"
else
VCS="github"
fi
fi
```
For self-hosted GitLab instances whose hostname doesn't contain "gitlab", the user can override by passing `--vcs gitlab` as an input. For Perforce, pass `--vcs perforce`.
### 1. Identify the PR/MR/CL
**GitHub:**
```bash
gh pr view --json number,headRefName -q '{number: .number, branch: .headRefName}'
```
**GitLab:**
```bash
glab mr view --output json | jq '{iid: .iid, branch: .source_branch}'
```
Switch to the PR/MR branch if not already on it.
**Perforce:**
```bash
# List pending changelists for current user/client
p4 changes -s pending -u $P4USER -c $P4CLIENT
# Describe a specific CL
p4 describe -s <CL_NUMBER>
```
Ensure the correct workspace (`p4 client`) is set before proceeding.
Key field differences:
- GitHub: `number`, `headRefName`, `headRefOid`
- GitLab: `iid`, `source_branch`, `sha`
- Perforce: changelist number, `P4CLIENT`, shelved files
### 2. Loop
Repeat the following cycle. **Max 5 iterations** to avoid runaway loops.
#### A. Trigger Greptile review
Push/shelve the latest changes (if any):
**GitHub/GitLab:**
```bash
git push
```
**Perforce:**
```bash
# Re-shelve to update the shelved files for review
p4 shelve -f -c <CL_NUMBER>
```
Wait for checks to start after push/shelve:
```bash
sleep 5
```
**GitHub** — check if Greptile is already running before posting a new trigger comment:
```bash
GREPTILE_STATE=$(gh pr checks <PR_NUMBER> --json name,state | jq -r '.[] | 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:
```bash
HEAD_SHA=$(gh pr view <PR_NUMBER> --json headRefOid -q .headRefOid)
while true; do
GREPTILE_CHECK=$(gh api "repos/{owner}/{repo}/commits/$HEAD_SHA/check-runs" \
--jq '.check_runs[] | select(.name | test("greptile"; "i"))' 2>/dev/null)
if [ -z "$GREPTILE_CHECK" ]; then
echo "Waiting for Greptile check to appear..."
sleep 5
continue
fi
STATUS=$(echo "$GREPTILE_CHECK" | jq -r '.status // "completed"')
CONCLUSION=$(echo "$GREPTILE_CHECK" | jq -r '.conclusion // "pending"')
if [ "$STATUS" = "completed" ]; then
if [ "$CONCLUSION" = "success" ]; thenFrom haseeb-heaven/gworkspace-agent, MIT.
More from haseeb-heaven/gworkspace-agent
- 0.586score
check-pr
greptileai
Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and…
SkillCFreshness: C★ 82Claude Code +9 - 0.575score
github-pr-mon
haseeb-heaven
Monitors a GitHub PR at intervals and posts reviews using Greptile.
SkillCFreshness: C★ 82Claude Code +9
Signals
- Stars
- 82
- Forks
- 21
- Open issues
- 0
- Last commit (this folder)
- May 1, 2026 (6 months ago)
- Last release
- May 9, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.2
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from greptileai
- 0.586score
check-pr
greptileai
Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and…
SkillCFreshness: C★ 82Claude Code +9 - 0.570score
check-pr
greptileai
Report a GitHub PR's merge readiness: pending or failing checks, unresolved review threads, an incomplete description, and optionally fix them.
SkillAFreshness: AClaude Code +9 - 0.565score
cli-review
greptileai
Runs a Greptile CLI review for the current local branch, installing or authenticating the CLI when needed, then summarizes JSON findings for the user.
SkillAFreshness: AClaude Code +9 - 0.565score
cli-review
greptileai
Run the Greptile CLI on the local branch and summarize its findings.
SkillAFreshness: AClaude Code +9 - 0.564score
greploop
greptileai
Loop a PR through Greptile review until 5/5 confidence with zero unresolved comments.
SkillAFreshness: AClaude Code +9 - 0.531score
greploop
greptileai
Iterate on an existing PR, MR, or shelved changelist until Greptile reaches 5/5 with no unresolved comments.
SkillCFreshness: C★ 5Claude Code +9
Cite this page
greploop skill. Agent Mart. https://agentmart.dev/skills/haseeb-heaven-greploop (last updated 2026-10-24)