review-loop
Skill9 starsChanged 5 months agoMITView on GitHub
Use only when the user explicitly asks to review, fix, and re-review a branch or PR until clean, or when an active ship/checkpoint workflow invokes it — "run the review loop", "review and fix until it passes", "loop review on this PR".
23 other projects use a version of this.
Adopted by
Most recently taken up by
- wufei-png/skillstheir own version, first seen Oct 7, 2026
- ignaval/skillstheir own version, first seen Oct 1, 2026
- mayankasthana/applymatetheir own version, first seen Oct 1, 2026
- brian-bell/agent-skillstheir own version, first seen Sep 26, 2026
- mmnto-ai/totemtheir own version, first seen Sep 25, 2026
- mthines/agent-skillstheir own version, first seen Sep 25, 2026
Used with
Projects with it also use research, tdd and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 3 projects that use this
AWSSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
AWSSkillgrill-me
A relentless interview to sharpen a plan or design.
Also in 3 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- sangrokjung/claude-forge★ 847same name
- microsoft/bocpy★ 198same name
- ntorga/agent-starter-kit★ 146same name
- 9thLevelSoftware/legion★ 78same name
- microsoft/Trieste★ 53same name
- agentcrew-academy/harness-starter-kit★ 39same name
- mmnto-ai/totem★ 17same name
- managoat/fountain★ 16same name
- mthines/agent-skills★ 13same name
- 200iqlabs/shared-skills★ 4same name
13 more not listed
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.
In this repository8 other files it gives its agents.
- checkpointSkill
- cmux-orchestrateSkill
- mergedSkill
- orchestrate-planSkill
- orchestrateSkill
- polishSkill
- review-fixSkill
- shipSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 22 edited versions we read keep these.
3
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
- Very specific: line 18
Create STATUS=$(mktemp "${TMPDIR:-/tmp}/tgc-review-loop.XXXXXX") and tell the user that progress is visible there.
- Distinctive: line 48
Create/truncate the passed status file outside the repo:
- Distinctive: line 87
Verify every finding against the current tree before acting.
- Distinctive: line 132
If a PR exists, post one comment containing outcome, iterations, fixed findings, dismissals with reasons, local gate evidence, and …
“Common” is measured: kept by at least 6 in 10 of the 22 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
Review Loop — review → fix → re-review until clean
Proceed only when the surrounding user request explicitly asks for the loop (including
direct /tgc-skills:review-loop invocation) or tgc-skills:ship/tgc-skills:checkpoint
invokes it. It commits fixes and pushes once, so stop without that authorization.
Review the branch diff with independent agents, fix legitimate findings, and repeat until clean or a stop condition is reached. Never merge the PR.
Keep the loop out of the main context
Create STATUS=$(mktemp "${TMPDIR:-/tmp}/tgc-review-loop.XXXXXX") and tell the user
that progress is visible there. Then launch one general-purpose subagent with the repo
path, optional PR/branch argument, status path, and the complete workflow below. The main
context manages only the dispatch and final report. Subagents may start in the
background; explicitly wait for this one to finish before returning or letting a parent
workflow report completion.
Subagent workflow
Setup and heartbeat
- Resolve the local
nameWithOwner, current branch, and GitHub default branch. Stop if the current branch is the default branch. Require a supplied branch argument to equal the current branch. If a PR is supplied or detected, require its URL repository to matchnameWithOwnerand itsheadRefNameto match the current branch. Stop on any mismatch. Use itsbaseRefName; without a PR, use the default branch. - Require a clean working tree. Stop and report staged, unstaged, or untracked files rather than silently excluding them.
Fetch the resolved base and review its diff consistently throughout the loop. Capture the base ref from command output into a shell variable and always reference it quoted — a valid Git ref can contain shell metacharacters (
$(...), backticks), and command-substitution output is not re-evaluated, so this cannot inject commands:BASE_REF=$(gh pr view <pr> --json baseRefName --jq .baseRefName \ || gh repo view --json defaultBranchRef --jq .defaultBranchRef.name) git fetch origin "$BASE_REF" LOOP_BASE=$(git rev-parse HEAD) git diff "origin/$BASE_REF...HEAD"Create/truncate the passed status file outside the repo:
STATUS="<passed status path>" : > "$STATUS"- Append one timestamped line when the loop starts and after every state change: review dispatched, verdicts received, fixing, committed, and exit. Remove only this file after the closing report/comment.
Loop — at most five iterations
1. Review with two independent agents
Dispatch both reviewers concurrently. Give each the branch, base, diff scope, and enough surrounding file context to judge. They report findings only and never edit.
- Correctness and security: logic errors, races, crash-level edge cases, security vulnerabilities, data corruption, and breaking API changes. Ignore style.
- Robustness and quality: error handling, resource leaks, realistic-input failures, misleading names/comments, and test gaps that hide those defects. Ignore formatting and linter findings.
Require exactly:
VERDICT: APPROVE | REQUEST_CHANGES
CRITICAL_ISSUES:
- [file:line] description
MINOR_ISSUES:
- [file:line] description2. Combine and judge
- Dedupe the same bug at the same location, keeping the clearest wording.
- Finish clean when neither reviewer has a critical issue and every minor finding for the current tree is fixed or dismissed with a recorded one-line reason.
- Verify every finding against the current tree before acting; prior iterations may have moved or removed the referenced code.
3. Fix and verify
Apply legitimate findings, critical first. Trace callers and fix the root cause. Skip ambiguous or architecture/product decisions with a reason.
Discover and run the repo's reproducible local gate from its instructions, pre-push
hook, and project scripts. Do not claim isolated workflow run: lines reproduce action
steps, matrices, services, or external checks. Fix local failures, stage only intended
files, and commit using the repo's convention with a conventional fallback. Do not push.
Then return to review.
4. Stop conditions
- clean: reviewers approve and minors are resolved → finish through squash/push.
- max-iterations: five iterations reached → push loop commits as-is and report what remains.
- non-converging: the same finding survives two consecutive fix iterations → push loop commits as-is and report the disagreement for the user.
- branch diverged: the remote changed during the loop → stop without force-pushing.
Clean exit: squash and push once
Count only commits created after LOOP_BASE:
N=$(git rev-list --count "$LOOP_BASE"..HEAD)N=0: push normally so a clean but unpublished branch is still published.N=1: keep the commit and push normally.N>1: before rewriting anything, confirm you are still on the branch the loop started on and thatLOOP_BASEis an ancestor ofHEAD(git merge-base --is-ancestor "$LOOP_BASE" HEAD); if either check fails, stop and report instead of resetting. Otherwisegit reset --soft "$LOOP_BASE", create one commit using the repo's convention (fallbackfix: address review findings), then push normally.
Establish an upstream when the branch has none. Never force-push. If the remote has diverged, stop and report it instead of retrying.
Closing report
If a PR exists, post one comment containing outcome, iterations, fixed findings, dismissals with reasons, local gate evidence, and unresolved items. Never post per-iteration comments.
Return the same facts to the caller, include both final reviewer verdicts, then remove the session status file. Merging remains the user's action.
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.

