reviewloop
Skill0 starsChanged 5 months agoMITView on GitHub
Use when a PR has feedback from MORE than one reviewer — any mix of bots (Greptile, CodeRabbit, Copilot, linters) and human teammates — and the user wants every reviewer driven to a clear state, not just one specific bot. Use when the user says "clear all the reviews", "address every reviewer", "loop until the PR is clean", or wants bot reviews re-triggered and re-checked automatically.
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- ankitvgupta/exotheir own version, first seen May 26, 2026
- mrdulasolutions/AOS-Mailtheir own version, first seen May 6, 2026
- fabianboth/autonomous-review-looptheir own version, first seen Feb 5, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ankitvgupta/exo★ 497same name
- fabianboth/autonomous-review-loop★ 2same name
- mrdulasolutions/AOS-Mail★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
7 rules. 1 is common, 5 are distinctive, and 1 is very specific to this project.
1
Common
Most of the 3 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
No uniform code path covers all reviewers.
- Distinctive: line 104
Stop the loop when all hold:
- Very specific: line 105
Every bot reviewer is at its done-condition (table) and its checks are success.
- Common: line 114
Read the file and understand the comment in context.
- Distinctive: line 116
If actionable, make the fix.
- Distinctive: line 118
Treat human comments with the same rigor as bot comments.
- Distinctive: line 190
If stopped at max iterations, list remaining unresolved threads per reviewer and suggest next steps.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Reviewloop
Drive a PR to all-clear across every reviewer — each bot AND each human — then loop until nothing actionable remains.
Core principle: A bot is a pure function you can re-invoke (re-trigger → poll → read verdict). A human is async and uncontrollable. So bots loop; humans get one pass and then you hand back. Never block the loop waiting on a person.
When to use
- A PR has comments from several reviewers and you want them all resolved in one driven pass.
- The reviewers are a mix you can't name up front — "address whatever's on the PR."
- You want bot reviews re-triggered after each fix, not just read once.
When NOT to use: You just want a one-shot read of what's outstanding with no loop and no re-triggering — that's a plain review-check, not this.
The reviewer registry (the spine)
No uniform code path covers all reviewers. Each needs four things — detect it, re-trigger it, read its verdict, know when it's done:
| Reviewer | Detect (by login) | Re-trigger | Read verdict | Done-condition |
| Greptile | greptile-apps (CI check + bot review) | comment @greptile review | N/5 confidence in PR body / its review | 5/5 and its threads resolved and check success |
| CodeRabbit | coderabbitai | comment @coderabbitai full review | walkthrough + inline actionable comments (no score) | zero unresolved actionable CodeRabbit threads |
| Copilot | copilot-pull-request-reviewer / Copilot | gh pr edit <PR> --add-reviewer @copilot (gh ≥ 2.88.0) — NOT a comment, NOT the REST reviewers API | inline suggestions/comments | zero unresolved Copilot threads on latest head |
Other bot (__typename: Bot) | any login, structurally a bot | unknown — do not guess a command; report it | read its check run / comments | its check success / its threads resolved |
Human (__typename: User) | any non-bot login | gh pr edit <PR> --add-reviewer <login> to re-request — then hand back | inline + summary review (CHANGES_REQUESTED / COMMENTED / APPROVED) | actionable threads resolved + replied + re-review requested → stop, do not wait |
Detection is structural, not an allowlist. Classify every reviewer by GitHub's __typename
(Bot vs User) first; only then look up known bots in the table for their re-trigger command. An
unknown bot is still handled (read + report) — it is never silently skipped.
Inputs
- PR number (optional): default to the PR for the current branch.
--max-iterations N(optional, default 5): cap on the bot loop.
The loop
0. Identify the PR
gh pr view --json number,headRefOid -q '{number: .number, sha: .headRefOid}'Switch to the PR branch if not already on it. Capture <PR> and <HEAD_SHA>.
1. Enumerate reviewers (one query — the heart of the skill)
Pull verdicts, inline threads, and each author's __typename in a single GraphQL call:
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!,$cursor:String) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$pr) {
reviews(first:50) { nodes { author { login __typename } state submittedAt body } }
reviewThreads(first:100, after:$cursor) {
pageInfo { hasNextPage endCursor }
nodes {
id isResolved isOutdated
comments(first:1) { nodes { author { login __typename } path body } }
}
}
}
}
}' -F owner=OWNER -F repo=REPO -F pr=<PR>Paginate reviewThreads via endCursor until hasNextPage is false. Also fetch:
- Bot summaries / scores (Greptile score, CodeRabbit walkthrough) — issue comments and PR body:
gh pr view <PR> --json body -q .body gh api repos/{owner}/{repo}/issues/<PR>/comments - CI-based bots (Greptile and others run as checks):
gh api repos/{owner}/{repo}/commits/<HEAD_SHA>/check-runs --jq '.check_runs[] | {name, status, conclusion}'
Now build the work list: for each reviewer present, classify (known bot / unknown bot / human) and
collect its unresolved threads (isResolved == false) and verdict.
2. Check the exit condition
Stop the loop when all hold:
- Every bot reviewer is at its done-condition (table) and its checks are
success. - Zero unresolved actionable threads from any reviewer (bot or human).
- The human pass (step 6) has been completed once this run.
Or when max iterations is hit (report remaining state).
3. Fix actionable comments
For each unresolved thread, across all reviewers:
- Read the file and understand the comment in context.
- Decide actionable (code change) vs informational / false positive.
- If actionable, make the fix. If not, note why — you'll still resolve/reply.
Treat human comments with the same rigor as bot comments; do not down-prioritize them.
4. Resolve threads
Resolve every thread you've addressed (and informational ones), batching with GraphQL aliases. For the
exact resolveReviewThread mutation and thread-fetch pagination, see
references/github-mechanics.md. For human threads, prefer a brief
reply explaining the fix before resolving.
5. Commit, push, re-trigger bots
git add -A
git commit -m "address review feedback (reviewloop iteration N)"
git push
sleep 5Then re-trigger each bot reviewer by its registry command — but only if it isn't already running
(guard on check-runs status / its last comment timestamp first; see
references/github-mechanics.md):
# Greptile (only if its check isn't already PENDING/IN_PROGRESS)
gh pr comment <PR> --body "@greptile review"
# CodeRabbit
gh pr comment <PR> --body "@coderabbitai full review"
# Copilot
gh pr edit <PR> --add-reviewer @copilotFor an unknown bot, do not invent a command — log "no known re-trigger for <login>; left as-is"
and carry its current verdict forward.
6. Handle humans — ONE pass, then hand back
For each human reviewer with outstanding feedback:
- Fix their actionable comments (step 3) and reply + resolve threads (step 4).
- Re-request their review:
gh pr edit <PR> --add-reviewer <login>. - Do not poll or wait for them. Record them as "waiting on @
<login>" and continue.
The loop's job for humans ends at "addressed + re-requested." Blocking on a person is out of scope.
7. Poll bot completion, then loop
Poll each re-triggered bot's check run / review to a terminal state (the check-run polling loop is in references/github-mechanics.md). When all bots are terminal, go back to step 1.
Common mistakes
| Mistake | Fix |
Re-triggering Copilot with a comment (@copilot review) | Copilot has no comment command — use gh pr edit <PR> --add-reviewer @copilot. |
| Filtering reviewers by a hardcoded name list | Detect bot-ness by __typename == "Bot"; the name list is only for re-trigger lookup. |
| Skipping an unrecognized bot | Read and report it; only its re-trigger is unknown, not its feedback. |
| Blocking the loop until a human approves | Humans get one pass; hand back and report. |
Spamming @coderabbitai full review every iteration | One full review per push is enough; guard on whether it's already running. |
| Resolving a human thread with no reply | Reply with the fix first, then resolve — humans read the thread. |
Report
Reviewloop complete.
PR: #5876
Iterations: 3
Bots cleared: greptile-apps (5/5), coderabbitai (0 open), Copilot (0 open)
Humans: re-requested @neeraj-lightwork-ai (was CHANGES_REQUESTED)
Resolved: 11 threads
Remaining: 0 bot / waiting on 1 humanIf stopped at max iterations, list remaining unresolved threads per reviewer and suggest next steps.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

