Review Pull Request
Use this skill when the user asks for a PR review of the current branch or a specific
PR.
Inputs
- Optional PR number
- Optional
--quick to stop after the change analysis phase
Hard Rules
- Stay read-only.
- Do not edit files, commit, push, rebase, or change GitHub state.
- Do not run build, install, or test commands that mutate the environment.
- Use
gh for PR metadata and git diff retrieval.
Reference Files
references/review-pr-domains-and-signals.md
references/review-pr-templates.md
Workflow
Phase 1: Resolve PR context
- Use
gh pr view to fetch PR title, body, state, draft status, and changed files.
- If no PR exists, stop and report that clearly.
- If the PR is closed, stop.
- Record the branch name and changed file list.
Phase 2: Change analysis
- Classify changed files using
references/review-pr-domains-and-signals.md.
- Determine the highest overall risk level:
CRITICAL, HIGH, MEDIUM, or LOW.
- Build a
CHANGE_ANALYSIS_REPORT that lists:
- detected domains/signals
- risk level
- affected files
- related frameworks
- likely failure modes
If --quick is set, return the change analysis report and stop here.
Phase 3: Review planning
- Select the smallest useful set of review passes from
references/review-pr-templates.md.
- Split by risk area, not by file count.
- Always include at least one general logic pass.
Phase 4: Expert consultation
Consult the matching Codex subagents registered in .codex/config.toml when relevant:
archon-expert
fsdp-expert
megatron-expert
algorithm-expert
launcher-expert
If the Codex runtime supports parallel subagent execution, run independent review passes
in parallel. Otherwise, execute them serially.
Phase 5: Final review
Produce findings first, ordered by severity:
CRITICAL
HIGH
MEDIUM
LOW
For every finding, include:
- file path
- line number when available
- why it is a bug, regression, or risk
- concrete fix direction
What to Ignore
- Pure style nits with no correctness impact
- Issues outside the changed scope unless the PR makes them worse
- Failures that standard linters or formatters would already catch
- Speculative concerns with no concrete trigger in the diff
Output Shape
Use this structure:
CHANGE_ANALYSIS_REPORT:
- detected_domains: [...]
- detected_signals: [...]
- risk_level: ...
- affected_files: [...]
- related_frameworks: [...]
- identified_risks: [...]
Findings
1. [severity] Title — path:line
- Problem: ...
- Fix: ...
Open Questions
- ...
Residual Risk
- ...
1---2name: review-pr3description: Read-only pull request review workflow with risk analysis, targeted checklists, and Codex subagent consultation.4---56# Review Pull Request78Use this skill when the user asks for a PR review of the current branch or a specific9PR.1011## Inputs1213- Optional PR number14- Optional `--quick` to stop after the change analysis phase1516## Hard Rules1718- Stay read-only.19- Do not edit files, commit, push, rebase, or change GitHub state.20- Do not run build, install, or test commands that mutate the environment.21- Use `gh` for PR metadata and git diff retrieval.2223## Reference Files2425- `references/review-pr-domains-and-signals.md`26- `references/review-pr-templates.md`2728## Workflow2930### Phase 1: Resolve PR context31321. Use `gh pr view` to fetch PR title, body, state, draft status, and changed files.331. If no PR exists, stop and report that clearly.341. If the PR is closed, stop.351. Record the branch name and changed file list.3637### Phase 2: Change analysis38391. Classify changed files using `references/review-pr-domains-and-signals.md`.401. Determine the highest overall risk level: `CRITICAL`, `HIGH`, `MEDIUM`, or `LOW`.411. Build a `CHANGE_ANALYSIS_REPORT` that lists:42 - detected domains/signals43 - risk level44 - affected files45 - related frameworks46 - likely failure modes4748If `--quick` is set, return the change analysis report and stop here.4950### Phase 3: Review planning51521. Select the smallest useful set of review passes from53 `references/review-pr-templates.md`.541. Split by risk area, not by file count.551. Always include at least one general logic pass.5657### Phase 4: Expert consultation5859Consult the matching Codex subagents registered in `.codex/config.toml` when relevant:6061- `archon-expert`62- `fsdp-expert`63- `megatron-expert`64- `algorithm-expert`65- `launcher-expert`6667If the Codex runtime supports parallel subagent execution, run independent review passes68in parallel. Otherwise, execute them serially.6970### Phase 5: Final review7172Produce findings first, ordered by severity:73741. `CRITICAL`751. `HIGH`761. `MEDIUM`771. `LOW`7879For every finding, include:8081- file path82- line number when available83- why it is a bug, regression, or risk84- concrete fix direction8586## What to Ignore8788- Pure style nits with no correctness impact89- Issues outside the changed scope unless the PR makes them worse90- Failures that standard linters or formatters would already catch91- Speculative concerns with no concrete trigger in the diff9293## Output Shape9495Use this structure:9697```markdown98CHANGE_ANALYSIS_REPORT:99- detected_domains: [...]100- detected_signals: [...]101- risk_level: ...102- affected_files: [...]103- related_frameworks: [...]104- identified_risks: [...]105106Findings1071. [severity] Title — path:line108 - Problem: ...109 - Fix: ...110111Open Questions112- ...113114Residual Risk115- ...116```