---
name: greploop
description: Address Greptile feedback on a PR, MR, or shelved changelist through bounded review and fix cycles. Use when the task includes a Greptile review loop. Supports the alternate @greptile-apps trigger for large PRs.
license: MIT
compatibility: GitHub automation requires Python 3.10+ and authenticated gh. GitLab requires glab; Perforce requires p4 and the site's review integration. Greptile must be installed.
metadata:
  author: greptileai
  version: "2.0"
title: greploop
canonical_url: https://skilld.dev/gh/michaelshimeles/rstack/greploop
last_updated: 2026-10-16T23:06:24.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [LICENSE](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/LICENSE), [references/github.md](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/github.md), [references/gitlab-api.md](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/gitlab-api.md), [references/graphql-queries.md](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/graphql-queries.md), [references/perforce.md](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/perforce.md), [scripts/github_review.py](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/scripts/github_review.py).
>
> If the user asked to install this Skill, run `npx skilld install michaelshimeles/rstack/greploop`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/greploop`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/michaelshimeles/rstack/greploop) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/greploop`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/greploop --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/greploop --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Greploop

Improve the requested change using Greptile feedback. Success means a fresh
5/5 review of the current revision with no unresolved actionable Greptile
findings. The bot's score complements the project's checks and your judgment.

## Inputs

- PR, MR, or changelist number. Infer it from the current task when omitted.
- `--max-iterations N`, a positive integer, defaults to 10 review cycles.
- `--trigger @greptile` by default, or `@greptile-apps` for the alternate route.
  Use the alternate when the normal trigger reports too many changed files.
- `--vcs github|gitlab|perforce` when repository context is ambiguous.

Apply the user's existing authorization and task scope. A read-only review
request does not authorize code edits or posting comments. Keep your own task's
worktree and branch; do not switch another task's checkout to the PR branch.

## Choose the platform

Use the repository and session context, not an installed executable alone.
Read only the relevant reference:

- [GitHub](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/github.md): the bundled helper tracks each trigger and
  waits for a scored review tied to the current commit.
- [GitLab](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/gitlab-api.md): use notes and resolvable discussions;
  CI pipeline activity alone does not identify a Greptile review.
- [Perforce](https://skilld.dev/api/skills-raw/michaelshimeles/rstack/greploop/references/perforce.md): use the configured Swarm or site adapter.

## Review cycle

1. Confirm the target revision, clean task ownership, and effective iteration
   cap. Run relevant checks before publishing edits and push or shelve them.
2. Start one review attempt using the platform reference. Record its trigger
   and revision. Wait at most 10 minutes for fresh results; do not reuse an
   earlier score just because it belongs to the same commit.
3. Read the entire fresh summary, including general-comment findings. Fetch
   all pages of unresolved Greptile threads. An empty inline-comment list does
   not prove the summary contains no remaining work. Older unresolved threads
   remain relevant until addressed, even after their lines become outdated.
4. If the current review is 5/5, no actionable Greptile findings remain, and
   relevant checks pass, finish. Otherwise evaluate each finding in context.
   Fix valid issues within the task. For a false positive, record the reason
   and supporting evidence before resolving it. Do not change correct code
   merely to chase the score or resolve other reviewers' threads.
5. Run checks for the fixes. Commit only task files, push or re-shelve, then
   resolve the specific threads whose fixes are published. Use explicit file
   paths when staging. If no code changed, skip the commit and push.
6. Start a new attempt for the resulting revision if the cap permits it.
   A changed head invalidates the old attempt. Do not reuse an attempt file
   or retrigger merely because a poll has not returned yet.

Stop when the cap is reached, a review times out, the integration is unavailable,
or the remaining findings require a scope decision. Report the actual result
and remaining work. Do not raise the cap automatically or call a partial
result complete. The iteration cap includes reviews that produce no edits.

## Report

Give the PR/MR URL or changelist, reviewed revision, number of cycles, current
score, checks run, resolved findings, and remaining findings. Distinguish a
successful review from a timeout or capped run. Do not merge unless requested.
