com um clique
review-pr
Multi-agent correctness review of a pull request.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Multi-agent correctness review of a pull request.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Diagnose and safely recover stuck terminating Kubernetes pods on Marin CoreWeave clusters, especially node-bound GPU pods. Use for deletion hangs, suspected uninterruptible GPU/NCCL waits, node cordoning or reboot decisions, and force-deletion requests.
Refresh Marin TPU-vLLM forks from a tpu-inference release/LKG pair, update exact SHA pins, run TPU smokes, and open the Marin PR.
Lint, run the pre-PR checks, commit, push, and author or update the branch's pull request in the required plain-text format. Use when committing, pushing, or creating/updating a PR.
Launch, monitor, and seal Marin canary and daily ferry runs.
File a GitHub issue for a bug or improvement found this session.
Multi-session research workflow: compose logbooks, experiment issues, documentation updates, and snapshot discipline for long-running investigations.
| name | review-pr |
| description | Multi-agent correctness review of a pull request. |
| allowed-tools | Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*), Bash(gh pr list:*), Bash(uv run infra/codehealth/log_stats.py:*), mcp__github_inline_comment__create_inline_comment |
Provide a code review for the given pull request.
Agent assumptions (applies to all agents and subagents):
Follow these steps precisely:
Launch a haiku agent to check if any of the following are true:
gh pr view <PR> --comments) AND a re-review was not explicitly requested. When a maintainer explicitly requests a re-review, always proceed even if a prior review exists.If any condition is true, stop. Note: still review Claude-generated PRs.
Launch a haiku agent to return file paths (not contents) for all relevant CLAUDE.md and AGENTS.md files:
Launch an opus agent to view the PR and return a summary of the changes. The
same agent also checks the PR description against the PR-body rules in
.agents/skills/commit/SKILL.md §8 and returns any problems it finds:
## Summary that restates the title, a ## Changes that just
lists the touched files) — markdown is fine when it makes the change clearer,
the problem is structure that carries no information a reviewer needs;A terse, plain body for a small change is correct — do not flag mere brevity or the absence of markdown. Flag only descriptions that read like a filled-in form rather than a commit message.
Launch 4 agents in parallel to independently review the changes. Each returns a list of issues; each issue includes a description and the reason it was flagged (e.g. "CLAUDE.md adherence", "bug").
Agents 1 + 2: CLAUDE.md/AGENTS.md compliance opus agents. Audit changes for compliance. When evaluating a file, only consider CLAUDE.md/AGENTS.md files that share its path or are parents. If the PR adds or changes tests, read root TESTING.md plus the relevant module-specific testing docs, and check for low-value/slop tests or local testing-policy violations.
Agents 3 + 4: Opus bug agents (parallel). Scan for obvious bugs, security issues, and incorrect logic within the changed code. Focus only on the diff without reading extra context. Flag only significant bugs you can validate from the diff alone; ignore nitpicks and likely false positives.
CRITICAL: We only want HIGH SIGNAL issues. Flag issues where:
Do NOT flag:
If you are not certain an issue is real, do not flag it. False positives erode trust.
Tell each subagent the PR title and description for author-intent context.
Marin-specific: In experiments/grug, duplication is often intentional for high-velocity research iteration. Do not flag copy/paste or DRY concerns if behavior/contracts are correct.
For each issue from agents 3 and 4, launch a parallel subagent to validate it. Give the subagent the PR title, description, and issue description. It must confirm with high confidence that the issue is real — e.g. for "variable is not defined", verify that in the code; for a CLAUDE.md issue, verify the rule is scoped to this file and actually violated. Use Opus subagents throughout — for both bugs/logic and CLAUDE.md violations.
Filter out any issues not validated in step 5. The remainder is the high-signal review list.
Emit a stats event for this review (best-effort — never retry, never
surface failures to the user). This step runs unconditionally, before
any of the early-stop branches below, so we capture no-finding runs and
non---comment runs in the dashboard. Run from the repo root:
cat <<'EOF' | uv run infra/codehealth/log_stats.py
{
"tool": "review-pr",
"invocation": {
"trigger": "local",
"agent_cli": "claude",
"pr_number": <PR>,
"agent_exit_code": 0,
"timed_out": false
},
"findings": [
["<file>", <line>, "<category>", 1.0, "<first 200 chars of issue description>"]
]
}
EOF
<category> is one of: bug, claude-md-adherence.findings row per validated issue. Pass "findings": [] if there
were none — the empty row in the invocations table is the
"tool ran with no signal" datapoint we want. finding_count is derived
from the findings array length by log_stats.py.Output a summary of the review findings to the terminal:
If --comment argument was NOT provided, stop here. Do not post any GitHub comments.
If --comment IS provided and step 3 found PR-description problems, post one
top-level comment with gh pr comment (prefixed 🤖, not inline) naming the
specific problems and the concrete fix (e.g. "drop the Testing section; lead
with what changed and why"). This is independent of the code review — post it
whether or not code issues were found, but skip it when the description is fine.
If --comment argument IS provided and NO code issues were found, post the
no-issues summary comment using gh pr comment and stop.
If --comment argument IS provided and code issues were found, continue to step 9.
Draft the list of comments you plan to leave. For your own review only — do not post it anywhere.
Post inline comments for each issue using mcp__github_inline_comment__create_inline_comment with confirmed: true. For each comment:
IMPORTANT: Only post ONE comment per unique issue. Do not post duplicate comments.
Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag):
Notes:
TESTING.md and the relevant module-specific AGENTS.md/TESTING.md/testing docs as the review checklist. Flag only concrete violations; do not use them to request broad coverage improvements.--comment argument is provided, post a comment with the following format:No issues found. Checked for bugs and CLAUDE.md compliance.
https://github.com/owner/repo/blob/$(git rev-parse HEAD)/foo/bar will not work, since your comment will be directly rendered in Markdown.L4-7)