Review pr

From tsinghua-fib-lab/AutoSOTA · View interactive version

Review pr is an AI agent skill from the GitHub repository tsinghua-fib-lab/AutoSOTA. Read-only pull request review workflow with risk analysis, targeted checklists, and Codex subagent consultation.

How to use this skill

Skill file

Review Pull Request

Use this skill when the user asks for a PR review of the current branch or a specific

PR.

Inputs

Hard Rules

Reference Files

Workflow

Phase 1: Resolve PR context

  1. Use gh pr view to fetch PR title, body, state, draft status, and changed files.
  2. If no PR exists, stop and report that clearly.
  3. If the PR is closed, stop.
  4. Record the branch name and changed file list.

Phase 2: Change analysis

  1. Classify changed files using references/review-pr-domains-and-signals.md.
  2. Determine the highest overall risk level: CRITICAL, HIGH, MEDIUM, or LOW.
  3. Build a CHANGE_ANALYSIS_REPORT that lists:

If --quick is set, return the change analysis report and stop here.

Phase 3: Review planning

  1. Select the smallest useful set of review passes from

references/review-pr-templates.md.

  1. Split by risk area, not by file count.
  2. Always include at least one general logic pass.

Phase 4: Expert consultation

Consult the matching Codex subagents registered in .codex/config.toml when relevant:

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:

  1. CRITICAL
  2. HIGH
  3. MEDIUM
  4. LOW

For every finding, include:

What to Ignore

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
- ...
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.