Interactive code review for NVIDIA-NeMo/RL pull requests. Checks out PR locally, reads existing comments, applies coding guidelines from skills, previews findings, and posts review comments. Also supports reviewing the current branch locally.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Interactive code review for NVIDIA-NeMo/RL pull requests. Checks out PR locally, reads existing comments, applies coding guidelines from skills, previews findings, and posts review comments. Also supports reviewing the current branch locally.
Interactive PR Review — NVIDIA-NeMo/RL
Review a pull request or local branch interactively, applying the project's coding guidelines.
Parse Arguments
If $ARGUMENTS contains a number → PR mode with that PR number
If $ARGUMENTS is empty or has no number → LOCAL mode (review current branch vs main)
If $ARGUMENTS contains update → UPDATE mode (PR mode only)
If $ARGUMENTS contains --deep → use parallel subagents for deeper review
Repo: NVIDIA-NeMo/RL
Examples:
/review-pr 123 — review PR #123, single agent
/review-pr 123 --deep — review PR #123 with parallel subagents
/review-pr 123 update — follow up on existing threads for PR #123
/review-pr — review current branch vs main, terminal output only
mcp__github__pull_request_read method=get_comments → general PR comments
LOCAL mode — git diff
git diff $(git merge-base main HEAD)..HEAD
git diff $(git merge-base main HEAD)..HEAD --name-only
No MCP calls needed.
Both modes — local reads
Read @CLAUDE.md from repo root for review philosophy
Read all .claude/skills/*/SKILL.md files (except review-pr) for guideline rules
Glob .claude/review-memory/*.md — if any exist, read them for learned patterns
Phase 3: Analyze
Single-agent mode (default)
Analyze all changes yourself. Return a list of candidate issues — each with file, line, category, and description. Do NOT score them yet; scoring happens in the validation step (Phase 3b).
Deep mode (--deep) — parallel subagents
Launch 3 opus subagents in parallel using the Agent tool. Provide each with the diff, PR description (if PR mode), and the guideline skills content. Each returns a list of candidate issues (file, line, category, description). Do NOT ask them to score — scoring happens in Phase 3b.
Subagent 1 — Guideline compliance:
Review the diff against all guideline skills (code-style, config-conventions, error-handling, testing, copyright, docs). For each violation, return the file, line, description, and which skill it violates.
Subagent 2 — Bug scan (diff only):
Scan for obvious bugs in the diff without reading surrounding context. Flag syntax errors, type errors, clear logic errors, missing imports, unresolved references.
Subagent 3 — Contextual bug scan:
Read surrounding code and git history for each changed file. Look for bugs that only become apparent with context: incorrect API usage (especially megatron-bridge, megatron-lm, automodel, gym), race conditions, broken assumptions.
After all subagents return: merge results and deduplicate (same file+line+issue = one finding). Then proceed to Phase 3b.
Analysis rules (all modes)
NEW mode
Analyze the diff against all guideline skills
For each changed file, read surrounding context locally using Read and Grep to understand the change in context
Cross-reference existing review comments (PR mode only, from step 4) to avoid duplicating points already raised by other reviewers
Compare any new component to its nearest existing analog in the repo (a new worker group ↔ lm_policy.py, a new advantage estimator ↔ the existing estimators, a new config block ↔ MasterConfig) and flag missing affordances: backend dispatch, override hooks (e.g. resolve_policy_worker_cls), guards/validation, type annotations, return-shape consistency. "It works for the shipped recipe" is not enough if it silently diverges from the sibling's contract
[GUIDELINE] — Violations of coding guidelines from skills
[DOC] — Outdated or missing documentation
UPDATE mode (PR mode only)
Review all unresolved review threads on the PR
For each thread, determine if action is needed:
We disagree with the response → draft a comment like "We can resolve this thread because XYZ"
The author asked a question or made a comment that needs a response → draft an answer
CAN also create new comments if you notice something warranted while reviewing threads
Skip threads that are resolved or where no response is needed
Phase 3b: Validate & Score
For each candidate issue from Phase 3, launch a separate opus validation subagent using the Agent tool. Launch these in parallel (batch all at once).
Each validation subagent receives:
The candidate issue (file, line, category, description)
The relevant code context (the diff hunk + surrounding lines)
The PR title and description (if PR mode)
The specific guideline skill content (if it's a guideline violation)
The validation subagent's job:
Independently verify the issue is real by examining the actual code — e.g., if the issue says "variable is not defined", check that it's actually undefined; if it says a CLAUDE.md/skill rule is violated, confirm the rule applies to this file
Assign a confidence score (0-100):
Score
Meaning
0
Not confident, likely false positive
25
Somewhat confident, might be real
50
Moderately confident, real but minor
75
Highly confident, real and important
100
Absolutely certain, definitely real
Return: validated (yes/no), confidence score, and optionally a refined description
Filter: discard any issue scoring below 80. These are the false positives we want to avoid.
Phase 4: Preview & Confirm
Display findings to the user with confidence scores: