- name
SKILL.md
El archivo de la skill permanece en el repositorio del publicador.
Pega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add spencermarx/open-code-review --skill ocr-review-loop -a cursor -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add spencermarx/open-code-review --skill ocr-review-loop -a claude-code -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add spencermarx/open-code-review --skill ocr-review-loop -a codex -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add spencermarx/open-code-review --skill ocr-review-loop -a grok -yEnvía el mensaje copiado en un chat de Grok Bot. El Bot obtiene este SKILL.md de GitHub y lo añade a las skills que comparten todos tus Bots.
Install this skill: https://github.com/spencermarx/open-code-review/tree/HEAD/.claude/skills/ocr-review-loopDel publicador
Orchestrates an autonomous review → address → re-review loop on a pull request, using OCR's existing multi-agent review pipeline, until the review reaches an APPROVE verdict — then runs one final address pass for leftover suggestions. Every review and every address round is posted to the GitHub PR as a comment, producing a transparent, reviewable audit trail.
In this repo the loop is required before maintainer review (CONTRIBUTING.md → "Required: OCR
review loop before maintainer review"). Each posted comment carries a hidden marker that the
ocr-review-gate workflow reads to decide whether the PR keeps its needs-ocr-review label. The
policy needs: the latest review verdict is APPROVE, the team had at least 2 distinct personas
(3+ encouraged), and the PR's current head commit is the one that APPROVE review covered, or
the one pushed by an address pass posted after it (normally the final pass, round=final).
It is a thin orchestrator over two skills it does not reimplement:
/ocr:review → .ocr/commands/review.md (the 8-phase multi-agent review that emits a verdict)/ocr:address → .ocr/commands/address.md (corroborate feedback against code, then implement)/ocr:review./ocr:address.gh CLI installed and authenticated (for posting; skip with --no-post)..ocr/ exists, ocr CLI available). Run /ocr:doctor if unsure.git add -A blindly, since this skill
pushes to a public PR./ocr-review-loop [pr] [--team <spec>] [--max-rounds N] [--no-final-suggestions] [--no-post]
pr (optional): PR number. Default: the open PR for the current branch.--team <spec> (optional): reviewer team override (reviewer-id:count,...), forwarded to
/ocr:review. Default: the project's default team (ocr team resolve). Must contain at
least 2 distinct personas; 3+ encouraged, e.g. principal:2,quality:2,security:1.--max-rounds N (optional): safety cap on review rounds. Default: 5. The loop never
runs forever.--no-final-suggestions (optional): stop at APPROVE; skip the final suggestions pass.--no-post (optional): run locally; do not post to GitHub. Present the trail in-chat instead.
This leaves no evidence on the PR, so it does not satisfy the contribution policy.Execute this inline, to completion, in the conversation. Do not schedule across turns or background the work. Drive each review's phases 4→7 within one turn (OCR's "don't strand the pipeline" rule). See
reference/loop-mechanics.mdfor the exact CLI/session details, the marker formats, and the GitHub comment templates.
0. Preconditions. Resolve the PR and branch; refuse to run on the default branch. Confirm
gh (unless --no-post) and OCR setup. Resolve the reviewer team (default unless --team) with
ocr team resolve [--team "<spec>"] --json, which returns [{persona, instance_index, name, model}],
and count the distinct persona values. If there are fewer than 2, STOP before reviewing
and explain the policy: the loop needs at least 2 distinct personas (e.g. --team principal:2,quality:2, which is the default), and 3 or more are encouraged (e.g. --team principal:2,quality:2,security:1). Instance counts don't help (principal:3 is still one
persona), and ephemeral --reviewer personas don't count because they have no persona id.
1. Review-address loop. Count iterations with a local iteration (starting at 1, capped by
max-rounds). The round number used in file paths and markers is OCR's own (round-{n} in
the session), which continues across same-day re-runs, so never assume it equals iteration.
While the verdict is not APPROVE and iteration <= max-rounds:
git push, and confirm the PR's head SHA equals local
HEAD (retry once if GitHub hasn't caught up), so the reviewed commit is the PR's commit.
Record that full 40-hex SHA. Invoke /ocr:review with the full PR range as the target:
the PR's base commit (baseRefOid, fetched so it exists locally) to HEAD. Never the default
staged changes, never only the commits since the last round, and never a possibly stale local
main (in a fork it would pull upstream commits into the review). Pass --team if given. It
runs the full pipeline and finalizes rounds/round-{n}/final.md + round-meta.json with a
verdict.OCR multi-agent review — Round {n}, with the review
marker (``) as its first
line. Take personas from the reviewers that actually ran this round (the persona part of
each rounds/round-{n}/reviews/{persona}-{i}.md, excluding ephemeral-*), not from the
planned team. (skip if --no-post)round-meta.json / final.md):
APPROVE → exit the loop (proceed to step 2 below).NEEDS DISCUSSION → STOP the loop. This is a human gate — surface the
clarifying questions to the user and await direction. Do not fabricate a fix.REQUEST CHANGES → continue./ocr:address on rounds/round-{n}/final.md. Corroborate every
item against the actual code; implement the blockers and should-fixes (these clear the
gate); decline incorrect feedback with evidence; you MAY defer pure suggestions to the
final pass. Verify (typecheck + lint + tests) until green, then commit (atomic,
conventional) and push.--no-post)iteration += 1; loop (OCR starts round-{n+1}).2. Final suggestions pass (only after APPROVE, unless --no-final-suggestions):
invoke /ocr:address once more to clear remaining suggestions, verify, commit, push, and
post a final address comment (marker round=final, sha= the pushed commit) that includes a
loop-summary table (round → verdict → outcome). If this pass changes nothing, still post it,
with sha= the unchanged HEAD.
3. Stop conditions. If iteration exceeds max-rounds without APPROVE, stop and report
the outstanding blockers — never loop indefinitely. If APPROVE was reached on round 1, skip the
loop body and go straight to the final suggestions pass.
round-meta.json's, spaces → underscores), and never
list a persona that didn't review. sha is always the real full SHA (git rev-parse HEAD
after the push). Exactly one marker per comment, on its own line, outside any code block.
Fixing a typo in a posted marker so it records what actually ran is fine (the gate re-checks
on edit); changing its verdict or SHA is not.--max-rounds (default 5). If not approved by then, stop and surface why.NEEDS DISCUSSION is a human gate. Pause and ask; never invent a resolution for genuine
ambiguity..ocr/commands/address.md: verify each finding against the
code; implement valid items; decline wrong feedback with evidence. Don't gold-plate —
fix only what the review actually raised.round-{n+1}), reusing discovered-standards.md / context.md.reference/loop-mechanics.mdCONTRIBUTING.md/ocr:review,
/ocr:addressDrive a PR to an approved code review by looping OCR's multi-agent review and address steps. Runs /ocr:review then /ocr:address repeatedly until the review verdict is APPROVE, then one final /ocr:addr
---name: OCR Review-to-Approval Loopdescription: Drive a PR to an approved code review by looping OCR's multi-agent review and address steps. Runs /ocr:review…---# .claude/skills/ocr-review-loop/SKILL.mdResumen general
Drive a PR to an approved code review by looping OCR's multi-agent review and address steps. Runs /ocr:review then /ocr:address repeatedly until the review verdict is APPROVE, then one final /ocr:address for leftover suggestions, posting every review and every address round to the GitHub PR as comments with machine-readable markers. This is the pre-review CONTRIBUTING.md requires before maintainer review (APPROVE verdict, at least 2 distinct personas, covering the PR head). Use when the user asks to 'review and address in a loop', 'iterate review until approved', 'auto review-and-fix this PR', 'loop /ocr:review and /ocr:address', or to take a changeset all the way to a clean APPROVE with the default reviewer team. Wraps the /ocr:review (.ocr/commands/review.md) and /ocr:address (.ocr/commands/address.md) skills; needs a feature branch with an open GitHub PR and the gh CLI for posting.
Preguntas frecuentes
Descarga .claude/skills/ocr-review-loop/SKILL.md desde el publicador, o copia la ruta y abre el repositorio. PlugMCP lista la skill y no aloja el archivo.
El publicador lo mantiene en https://github.com/spencermarx/open-code-review.
Claude, Cursor, Codex y Grok Build pueden leer un SKILL.md que añadas desde el repositorio del publicador. Grok Bot lo instala cuando envías en un chat el enlace a la carpeta de la skill en GitHub.