agentleFS
Smirnov-LabsSmirnov-Labs/claude-skills/skills/watching-pr-bot-reviews/SKILL.md

watching-pr-bot-reviews

Skill6 starsChanged 10 days agoMITView on GitHub

Use when waiting for or reading a GitHub PR's bots (Codex, the Architecture Review or SAR, CI) with prbots: after a push, before merging, when asked \"what did the bots say\", or before writing a sleep loop around `gh api` or `gh pr view`.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use prbots, which ships in this skill's bin/ and is on PATH wherever skillsync installed it (otherwise call <this skill's base …

    line 12
  2. Very specific:

    Don't paste a polling recipe into subagent prompts.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Watching PR bot reviews

Never hand-roll a poller for PR bots — no until gh api …; do sleep 30; done, no wait-codex.sh. A 2026-10-16 transcript audit found 365 such waits across ~30 sessions (~800K output tokens, ~133M context tokens re-read), re-written after every push, keyed on five different "done" signals — and three PRs merged code Codex never reviewed. Use prbots, which ships in this skill's bin/ and is on PATH wherever skillsync installed it (otherwise call <this skill's base directory>/bin/prbots by its full path, from the PR's checkout).

SituationRunHow
Just opened the PRprbots wait <PR>Bash run_in_background: true
Just pushed to an open PRprbots wait <PR> --triggerBash run_in_background: true
"What did the bots say?" / before mergingprbots <PR>foreground, ~6-line digest

<PR> = number or PR URL (default: the current branch's PR); add -R owner/repo when cwd isn't the repo. After starting a background wait, do not poll it — no sleep, no tailing its output, no re-checking with gh. You are notified when it exits; its output is the digest.

This skill reads and waits; it never commits or pushes. To drive a PR to clean (fix → push → wait, repeated), the user runs /pr-fix.

Why --trigger after a push

Neither bot re-reviews a push by itself: Codex runs on PR open / ready-for-review / an @codex review comment; the SAR on open / ready-for-review / an @architect-run comment, never on push. --trigger posts those comments once per HEAD, only when no review of HEAD is running or already requested. Without it, wait exits 2 within ~75s once it is clear no review will start, instead of sitting out the timeout. If your checkout is the pushed PR branch, wait first waits for GitHub to show that SHA, so a wait started right after git push never reads the previous commit's review. A failed Codex review of HEAD (over its usage limit, say) counts as not reviewed; if it failed after an @codex review, wait exits 2 at once, and you retry by hand later.

Reading the result

PR #42 · acme/webapp · fix/session-timeout · HEAD 56d1b7b · OPEN
codex  ✗ 1 finding(s) @56d1b7b (P2×1) · PR opened
         P2 src/auth/session.ts:51  Expire refresh tokens on logout
sar    ✓ No issues found · severity 0/4 · blockers false · 01:22Z
ci     · no checks
verdict FIX — codex P2 src/auth/session.ts:51
verdict (wait exit)meaningdo
CLEAN (0)every needed bot reviewed HEAD, nothing openmay merge; show the digest to the user
FIX (1)open P2 / SAR advisoryfix, or reply on the thread with the reason; then push + wait --trigger
BLOCK (1)open P0/P1, SAR blockers or severity ≥3, CI failuremust fix (or reply with the reason) before merging
PENDING (2)a needed bot hasn't reviewed HEADread the x … line: timed out / needs --trigger / PR head not updated. Never merge on PENDING

A finding is handled once its thread is resolved or has a non-bot reply (shown [replied] / [resolved]). Don't declare a PR done without showing the user the digest, even when it is CLEAN. --full adds finding bodies + the full SAR; --json emits the machine payload. status always exits 0; errors exit 3. Other flags: --need codex,sar,ci|all (default codex, + sar if the repo has an architecture-review workflow; status adds ci), --timeout 30m, --interval 30 (one GraphQL call per poll), --sha SHA, --dry-run (print trigger comments instead of posting).

Orchestrating subagents

Don't paste a polling recipe into subagent prompts. On 2026-10-16 one did (… | grep -q Completed, which also matches the previous commit's review) and each of its 13 subagents then wrote its own wait-codex.sh. Give them one line instead:

Wait for the PR bots with prbots wait <N> -R <repo> --trigger (Bash run_in_background); merge only on CLEAN, or after addressing FIX/BLOCK — never on PENDING.

Signals (if you must reason by hand — prbots already does this)

  • Codex: one summary comment, edited in place, embeds <!-- codex-review-state:v1 {"code_review":{"commit_sha":…,"status":"running"|"completed"|"failed","has_any_findings":…,"has_unresolved_findings":…}} -->. Done for HEAD ⇔ commit_sha == HEAD && status == completed. Findings = review threads tagged codex-code-review-finding with a P0–P3 badge; a clean run posts a "Didn't find any major issues" receipt + 👍.
  • SAR: github-actions[bot] comment ## ✅|⚠️|🚫|🟢 Architecture Review - <verdict> with **Severity**: N/4 | **Blockers**: bool. Fresh only if posted after HEAD's commit / force-push.
  • Where they live (REST): Codex findings in pulls/<PR>/comments, its formal review in pulls/<PR>/reviews; its summary comment and the SAR both in issues/<PR>/comments.
  • Logins: REST = chatgpt-codex-connector[bot] / github-actions[bot]; GraphQL and gh pr view --json comments = chatgpt-codex-connector / github-actions (no [bot]). gh pr view does include both bots — a filter that expects the [bot] suffix there matches nothing, which makes it look as if the bots never commented.

Limits

SHA-strict: a clean rebase also reads as "HEAD not reviewed" — re-trigger, or judge it and say so. Reads the last 50 review threads.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.