reading-bot-pr-reviews
Skill5 starsChanged 7 months agoMITView on GitHub
Use when reading or reporting what automated PR reviewers left before merging — Codex (`chatgpt-codex-connector`) and an Architecture-Review / SAR GitHub Action (`github-actions[bot]`). Triggers on "what did the bots say", before declaring a PR done or merging, or when a Codex finding or clean verdict seems missing because `gh pr view --json comments` came back empty. Read-only (does not commit or push); for auto-fixing PR feedback use `/pr-fix` instead.
- Reads credentials
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- codex-plan-reviewSkill
- detect-overengineeringSkill
- git-reconSkill
- presentation-blueprintSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
If you were dispatched as a subagent to execute a specific delegated task, do NOT follow this skill — skip it and return to the task you …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
<SUBAGENT-STOP>
If you were dispatched as a subagent to execute a specific delegated task, do NOT follow this skill — skip it and return to the task you were given.
</SUBAGENT-STOP>Reading Bot PR Reviews
Overview
Two automated reviewers post PR feedback through channels the default gh query misses. Codex (chatgpt-codex-connector[bot]) posts to three endpoints; an Architecture-Review action posts a System Architecture Review (SAR) as a fourth. This skill fetches all four streams, filters on exact bot logins, classifies findings by severity, and reports a merge verdict.
Read-only. It reads and reports. It never commits or pushes — for an autonomous fix loop use /pr-fix.
Core principle: gh pr view --json comments misses both bots. A clean Codex verdict AND the SAR both live in issue comments, not inline. Filtering author logins by substring (codex, architect) misses both — the SAR posts as the generic github-actions[bot]. Use exact [bot] logins.
When to Use
- "What did the bots say on PR #N?" — before merging, or before declaring a PR done
- A Codex finding or a clean "no issues" verdict seems missing (the inline endpoint is empty)
- Confirming both reviewers passed before merge
Not for: auto-committing fixes to PR feedback (→ /pr-fix); sending a plan to Codex for review (→ codex-plan-review, the reverse direction).
The Four Streams
| # | Stream | Endpoint | Filter login | What lives here |
| 1 | Codex inline findings | pulls/<PR>/comments | chatgpt-codex-connector[bot] | Per-line findings with P1/P2/P3 severity badges |
| 2 | Codex formal review | pulls/<PR>/reviews | chatgpt-codex-connector[bot] | Top-level summary + review state (e.g. CHANGES_REQUESTED) |
| 3 | Codex run summary | issues/<PR>/comments | chatgpt-codex-connector[bot] | Clean "Didn't find any major issues" verdict lives ONLY here |
| 4 | Architecture SAR | issues/<PR>/comments | github-actions[bot] | System Architecture Review — severity rating + blocker list |
Streams 3 and 4 hit the same endpoint but filter for different bots — keep them as two separate queries so neither is lost in the other's output.
Quick Reference
Derive the PR and repo so this works in any repository (do not hardcode):
PR=${PR:-$(gh pr view --json number -q .number)} # or set PR=42 explicitly
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)Fetch all four streams (--paginate so long threads aren't truncated):
# 1. Codex inline findings (P1/P2/P3 detail)
gh api repos/$REPO/pulls/$PR/comments --paginate \
--jq '.[] | select(.user.login=="chatgpt-codex-connector[bot]") | {path, line, body}'
# 2. Codex formal review summary
gh api repos/$REPO/pulls/$PR/reviews --paginate \
--jq '.[] | select(.user.login=="chatgpt-codex-connector[bot]") | {state, body}'
# 3. Codex run summary (clean verdict lives here)
gh api repos/$REPO/issues/$PR/comments --paginate \
--jq '.[] | select(.user.login=="chatgpt-codex-connector[bot]") | .body'
# 4. Architecture SAR
gh api repos/$REPO/issues/$PR/comments --paginate \
--jq '.[] | select(.user.login=="github-actions[bot]") | .body'Triggering the bots (if they haven't run yet): comment @chatgpt-codex-connector review this PR for Codex; the Architecture-Review action runs automatically on PR opened/ready_for_review, and @architect-run re-triggers it.
gh pr comment $PR --body "@chatgpt-codex-connector review this PR"Codex takes ~2–3 min; the architecture review ~90s. They can be slower when backed up.
Classify and Report
Map findings to severity, then emit a single verdict:
- P0 / P1, or SAR severity ≥ 3, or a
CHANGES_REQUESTEDreview → BLOCK MERGE. Must address first. - P2 / low-severity SAR notes → RECOMMEND FIXES. Surface each with a fix-now-vs-follow-up call.
- P3 / "Didn't find any major issues" / SAR severity < 3, no blockers → CLEAN.
Report shape:
## Bot Review Summary — PR #<N>
**Codex inline:** <count> (P1: X, P2: Y, P3: Z) — <path:line + 1-line each>
**Codex review:** <state + body excerpt, or "no formal review">
**Codex run summary:** <body, esp. a clean verdict>
**Architecture SAR:** <severity + blockers, or "no SAR yet">
**Verdict:** BLOCK MERGE | RECOMMEND FIXES | CLEANCaveats
- Re-fetch after every push. Codex obsoletes its own findings — it updates a single review per push, so old findings are replaced by new commits. Reading stale output is the same as missing it.
- A force-push / rebase does NOT re-trigger the architecture review (it fires on
opened/ready_for_review). After a rebase, comment@architect-runto refresh the SAR. - Empty ≠ clean. Empty output can mean the bot hasn't finished. Confirm Codex finished via stream 3 (a clean run posts a run-summary comment there) before treating empty streams 1–2 as a pass.
- Don't declare the PR done without showing the user the output — even when it's "no findings, verdict CLEAN."
Common Mistakes
| Mistake | Why it bites | Fix |
gh pr view --json comments | Misses BOTH bots entirely | Hit the four gh api endpoints above |
Substring filter codex/architect | SAR posts as github-actions[bot]; misses it | Filter on exact [bot] login |
Checking only pulls/<PR>/comments | Clean Codex verdict + SAR live in issues/<PR>/comments | Always read all four streams |
| "Inline is empty, so Codex didn't run" | Clean verdicts post to issue comments | Check stream 3 before concluding |
| Hardcoding the repo | Skill won't travel to other repos | Derive REPO via gh repo view |
| Not re-fetching after a push | Codex obsoletes findings per push | Re-fetch every round |
Discovering the SAR bot in an unfamiliar repo
github-actions[bot] is the default when the Architecture-Review workflow posts via the built-in GITHUB_TOKEN (the common case). If a repo posts its SAR under a custom GitHub App or PAT, list distinct comment authors to find the real login, then swap it into stream 4:
gh api repos/$REPO/issues/$PR/comments --paginate --jq '.[].user.login' | sort -uDoes 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.

