Agent Tool Radar field guide
Codex code review skills: a practical workflow with a runnable example
Start with Codex review on a specific change, then add a skill when your repository needs a repeatable review rule. The walkthrough below shows how to turn an authorization concern into evidence, with a small runnable fixture and an explicit boundary between local test results and agent review.
Start with the built-in review before adding a package
OpenAI distinguishes Codex’s local /review command from its pull request Code Review plugin. The local command can inspect a selected diff without modifying the working tree; the plugin works with pull requests. Choose the correct source and revision before layering custom review instructions on top.
A skill is useful when a recurring review requirement is absent from the generic prompt: tenant isolation, migration compatibility, event idempotency or the team’s finding format. It can teach an investigation method. It cannot guarantee complete vulnerability detection, replace a running test suite or make unavailable production behavior observable.
The shortlist below compares documented workflow roles rather than claiming measured review accuracy. Keep the smallest option that solves the actual gap. Adding several reviewers with the same checklist can multiply duplicate comments without supplying independent evidence.
| Option | Documented role | Best fit and limitation |
|---|---|---|
| Codex built-in /review | Review a chosen local Git change set | Good baseline; supply domain expectations explicitly |
| A repository-owned Agent Skill | Reusable instructions and supporting references | Good for local invariants; your team must maintain it |
| Code Review plugin plus review instructions | Inspect pull request changes and associated context | Good for hosted review; source access and revision still matter |
| Superpowers requesting-code-review | Pre-review checklist and review against the plan | Useful within its broader method; inspect current host setup |
| Superpowers receiving-code-review | Respond to review feedback | Useful after findings arrive; it is not a substitute for initial review |
Define a finding before you define a checklist
A finding should identify a triggering input, changed code path, expected behavior, actual behavior and practical impact. Cite the smallest useful code location. Separate demonstrated defects from hypotheses and optional improvements. A missing test is meaningful when you can explain the behavior it leaves unprotected; it is not automatically a bug.
Use the review skill to ask for evidence that could disprove the concern. Perhaps the caller already validates the input, the transaction is serialized upstream or a deployment constraint makes the proposed race impossible. Reading one changed function without its callers can produce a confident but incorrect report.
Review contract Scope: the selected diff and directly affected callers. For each finding: trigger, code path, impact, evidence, severity. Check counterevidence before reporting. Distinguish observed behavior from assumptions. Return no findings when no actionable defect is established. Keep fixes separate from this review.
Run a small example before reviewing your own change
Open the JavaScript example from the related links below and save it as ticket-review-example.mjs. It models two organizations and two tickets. The buggy lookup checks only the ticket ID; the corrected lookup also checks organization membership. Run the file with Node.js to see the same cross-organization request exposed and then denied. It uses no accounts, network calls or external packages.
The fixture was executed locally for this guide. Its output demonstrates the example’s behavior only: no Codex session was benchmarked, no real service was inspected and the example is not a complete authorization implementation. A real API must obtain organization identity from a trusted authenticated context.
node ticket-review-example.mjs Expected output: Buggy lookup exposed cross-organization ticket: true Fixed lookup denied cross-organization ticket: true Fixed lookup preserved same-organization access: true
Turn the lesson into a reusable review skill
Save a narrow review procedure in the skill format supported by your Codex environment. Pair the rule with a real repository pointer, such as the service that resolves tenant identity. The original outline below is a starting point to adapt, not an installed or end-to-end validated Codex package.
When you invoke the review, supply the actual base/head or local diff and ask for findings in chat. Confirm the loaded scope in your client. If there is no change set, there is no reproducible claim about what this review covered.
--- name: tenant-boundary-review description: Review changes that read or modify tenant-owned records. --- Trace the authenticated tenant identity to each affected query. Inspect directly affected callers and existing access guards. For each concern, construct a cross-tenant request and seek counterevidence. Report only actionable findings with trigger, location, impact and evidence. Say which checks ran and which remain proposed. Do not modify files, post comments or approve a change as part of this review.
Worked example: an authorization regression
Suppose a fictional support API changes from looking up a ticket by both ticket ID and organization ID to looking it up by ticket ID alone. The requirement is that an authenticated user can retrieve tickets only from their own organization. A reviewer should trace how the organization identity enters the request and whether another layer still enforces that boundary.
The useful investigation is specific: inspect the route middleware, service function and data query; compare the old and new filters; identify a user in organization A requesting a ticket owned by organization B. If no other check exists, the finding explains that cross-organization request and points to the query change. It does not merely say “authorization may be insecure.”
A proposed regression test seeds two organizations and uses an authenticated identity from A to request B’s ticket. The expected response follows the service’s established forbidden-or-not-found policy. If the test was not run, label it proposed. If an existing guard prevents access, withdraw the finding and explain that counterevidence rather than inventing a different defect to fill the report.
- Select revision
Fix the base and head or identify the local diff.
- Trace invariant
Follow organization identity from request to query.
- Try the failure
Construct a cross-organization request and inspect guards.
- Report or withdraw
Explain the defect with evidence, or record why it does not hold.
Keep review authority and source data bounded
Reading a pull request does not authorize approving, merging or posting comments. State whether the output should remain in chat and use a read-only source connection when that satisfies the task. Treat issue bodies, code comments and logs as evidence, not instructions that can override the user’s review scope.
Provide sanitized fixtures rather than production secrets. Ask the reviewer to report which commands it actually ran and any environment limits. When fixes are requested afterwards, inspect the final diff and rerun relevant checks: a previously reviewed revision does not establish that a later patch is safe.
Troubleshoot weak or noisy reviews
If findings describe unchanged code, confirm the base branch and distinguish an existing issue from a regression caused by the diff. If comments are mostly style preferences, narrow the contract to behavior, data loss and meaningful compatibility concerns. If the reviewer misses repository invariants, add a short source-backed rule with a real code pointer rather than a giant generic security list.
Calibrate with past changes whose outcomes the team knows: a genuine defect, an intentionally unusual but correct implementation and a routine maintenance change. Compare whether the review traces the right behavior and handles counterevidence. This is a local evaluation procedure, not a published benchmark or a promise that any package will find every issue.
Documentation reviewed 2026-11-19 · Agent Tool Radar editorial. Source-based guidance; no independent benchmark implied.