$npx -y skills add openai/codex --skill review-agentPerform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.
| 1 | # Review Agent |
| 2 | |
| 3 | Inspect the requested target directly and return every finding that the author would likely fix. |
| 4 | Do not modify files, create commits, push branches, post review comments, or delegate the review |
| 5 | to another agent. |
| 6 | |
| 7 | ## Review the change |
| 8 | |
| 9 | 1. Read the applicable `AGENTS.md` instructions. |
| 10 | 2. Inspect the complete diff for the requested target and enough surrounding code to understand |
| 11 | each changed path. |
| 12 | 3. Identify concrete regressions introduced by the change. Continue through the whole diff after |
| 13 | finding the first issue. |
| 14 | 4. Check the relevant tests and call sites to confirm that each finding is real and actionable. |
| 15 | |
| 16 | For a base-branch review, compare the changes that would actually merge rather than diffing |
| 17 | directly against the branch tip. Resolve the comparison ref to the branch's upstream when that |
| 18 | upstream exists and is ahead of the local branch; otherwise use the local branch. Run |
| 19 | `git merge-base HEAD <comparison-ref>`, then inspect `git diff <merge-base-sha>`. If the local |
| 20 | branch cannot be resolved, try its configured upstream explicitly before reporting that the target |
| 21 | is unavailable. |
| 22 | |
| 23 | Flag an issue only when all of these are true: |
| 24 | |
| 25 | - It affects correctness, security, performance, or maintainability in a meaningful way. |
| 26 | - It is discrete and actionable. |
| 27 | - It was introduced by the reviewed change. |
| 28 | - The affected scenario or call path can be demonstrated from the code. |
| 29 | - The author would probably fix it if they knew about it. |
| 30 | |
| 31 | Do not flag speculative concerns, pre-existing problems, intentional behavior changes, or style |
| 32 | nits that do not obscure the code. |
| 33 | |
| 34 | ## Write the result |
| 35 | |
| 36 | Present findings first, ordered by severity. Use one entry per issue in this form: |
| 37 | |
| 38 | `[P1] Imperative finding title — path/to/file.rs:line` |
| 39 | |
| 40 | Follow the title with one short paragraph explaining the affected scenario and why the behavior is |
| 41 | wrong. Keep the cited range as small as possible and make sure it overlaps the reviewed diff. |
| 42 | |
| 43 | Use these priorities: |
| 44 | |
| 45 | - `P0`: universal release blocker or critical failure. |
| 46 | - `P1`: urgent defect that should be fixed next. |
| 47 | - `P2`: ordinary defect that should be fixed. |
| 48 | - `P3`: low-impact issue that is still worth fixing. |
| 49 | |
| 50 | If there are no qualifying findings, say `No findings.` Do not invent a finding to fill the result. |
| 51 | After the findings, add a brief overall assessment and mention any material test gaps or residual |
| 52 | risks. |