npx skills add ...
npx skills add prisma/prisma-next --skill github-review-iteration
npx skills add prisma/prisma-next --skill github-review-iteration
Orchestrates a GitHub PR review loop by delegating triage and implementation to dedicated sub-agents, then repeating until actionable review items are cleared. Use when the user says “address PR review”, “triage review comments”, or “iterate until review is clean”.
Run an iterative PR review loop: fetch state → render/summarize → triage actions → implement (code + Done + resolve) → re-fetch until the PR has no remaining actionable items.
This skill is an orchestrator. It delegates:
../review-triage-phase/agents/review-triager.md../review-implement-phase/agents/review-implementer.mdThe orchestrator owns sequencing, handoff, and loop control. It does not perform triage or implementation directly when delegation is available.
This skill depends on three sibling skills that live in the same parent directory:
../review-fetch-phase/ — fetches and renders PR review state../review-triage-phase/ — triages review threads into an action plan../review-implement-phase/ — implements triaged actions and resolves threadsAll script paths in this document are relative to this skill's directory. Use ../ to reach sibling skills. Do not search the workspace/repo for these files — they are part of the skills installation, not the project being reviewed.
This skill supports subcommands:
triage: fetch + triage into structured actionsimplement: execute the triaged actions and update statusiterate: loop triage → implement until clear (default)When output-dir is omitted, use the standard layout: wip/reviews/<owner>_<repo>_pr-<number>/ (derived from PR URL).
Example:
Store artifacts under:
wip/reviews/<owner>_<repo>_pr-<number>/
Canonical artifacts:
review-state.json (canonical v2)review-actions.json (canonical v2)Derived artifacts:
review-state.mdsummary.txt (or JSON summary)review-actions.mdapply-log.json (optional)When you need a thin wrapper for path setup + standard script calls, run:
For phase-specific execution without full orchestration, use:
/review-fetch-phase <PR_URL> [output-dir]/review-triage-phase <PR_URL> [output-dir]/review-implement-phase <PR_URL> [output-dir]git add -A / git add .)gh api TLS / cert failures in sandboxed shellsIf GitHub administration fails with an error like:
x509: OSStatus -26276 (or similar TLS/certificate verification failures)Treat it as an environment/sandbox cert-store mismatch, not a script bug.
Recovery:
gh calls outside the sandbox (use a shell mode that uses the system cert store).GH_NO_VERIFY_SSL, no custom curl flags).All script paths below are relative to this skill's directory.
review-actions.json is the contract between the triager and implementer.
Minimum v2 shape:
Rules:
target.nodeId).actions[] order intentionally (do not reorder).status (pending|in_progress|done) and done records in place.pull_request_review body may contain multiple findings (especially from automated reviewers like CodeRabbit which bundle "outside diff range" comments into the review body). The triager must decompose these into sub-actions (e.g., A02a, A02b). Never blanket-dismiss review bodies without reading their content.triageInvoke the review triager agent at ../review-triage-phase/agents/review-triager.md and pass:
<output-dir>/review-state.md<output-dir>/review-state.json<output-dir>/review-actions.md<output-dir>/review-actions.jsonThe triager must:
../review-fetch-phase/scripts/fetch-review-state.mjs)review-actions.json decisions/statusreview-actions.md and review-actions.jsonBefore returning from triage, verify that <output-dir>/review-actions.json exists and is valid for implementer consumption (version, PR metadata, and actions[] with target.kind + target.nodeId).
implementInvoke the review implementer agent at ../review-implement-phase/agents/review-implementer.md and pass:
<output-dir>/review-actions.md<output-dir>/review-actions.jsonThe implementer must:
will_address actionsreview-actions.json in-place (status, done)Responsibility note:
iterateRepeat delegated triage → delegated implement until there are no remaining actionable review items.
Loop contract:
triage delegation and read resulting review-actions.json.review-actions.json; if no will_address actions remain with pending or in_progress status, stop and report completion.implement delegation.triage delegation to refresh state and determine next iteration.If this repo provides dedicated slash commands or subagents for triage/implementation, prefer them to reduce manual steps.
node ../review-fetch-phase/scripts/render-review-state.mjs --in <review-dir>/review-state.json --out <review-dir>/review-state.md
node ../review-fetch-phase/scripts/summarize-review-state.mjs --in <review-dir>/review-state.json --format text --out <review-dir>/summary.txtnode ../review-triage-phase/scripts/render-review-actions.mjs --in <review-dir>/review-actions.json --out <review-dir>/review-actions.md{
"version": 2,
"pr": { "url": "https://github.com/OWNER/REPO/pull/123", "nodeId": "PR_kw..." },
"reviewState": { "path": "review-state.json", "fetchedAt": "...", "version": 2 },
"actions": [
{
"actionId": "A-001",
"target": { "kind": "review_thread", "nodeId": "PRRT_xxx", "url": "..." },
"decision": "will_address",
"summary": "One-line description of what will be done",
"rationale": null,
"targetFiles": ["path/to/file.ts"],
"acceptance": "How to tell it's done",
"status": "pending",
"done": null
}
]
}