plugins/codex/skills/diff-review/SKILL.md
Get Codex's code review of git changes via the Codex MCP server. Trigger when user wants a second opinion on code changes ("have Codex review my changes", "get code review from Codex", "review this diff with Codex"), or as a final check before committing.
npx skillsauth add robbyt/claude-skills diff-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use Codex to review git changes for bugs, security issues, and style problems. Codex consults; Claude writes.
Always use the MCP tool. The plugin runs codex mcp-server on stdio via .mcp.json. Tool name: mcp__plugin_codex_cli__codex. If the example below errors with an unknown-tool error, run /mcp and substitute the actual prefix (e.g., mcp__codex_cli__codex).
Omit model to use the default (gpt-5.5) for non-trivial diffs. For small diffs (~< 100 changed lines, single function, no security surface) you may set model: gpt-5.4-mini to save quota. Security or performance focused reviews should always use the default — don't downgrade. See ../references/patterns.md for the full table.
Codex reads files from the project root. Save the diff to a file there first:
git diff --cached > codex-review.diff
Then:
mcp__plugin_codex_cli__codex({
"prompt": "Review codex-review.diff for bugs, security issues, style problems, and missing error handling.",
"sandbox": "read-only"
})
Clean up after:
rm codex-review.diff
Uncommitted (staged + unstaged + untracked):
git diff HEAD > codex-review.diff
Branch vs base:
git diff main...HEAD > codex-review.diff
Specific commit:
git show <sha> > codex-review.diff
Security focus:
mcp__plugin_codex_cli__codex({
"prompt": "Security review of codex-review.diff:\n- XSS vulnerabilities\n- SQL/command injection\n- Sensitive data exposure\n- Auth/authz issues",
"sandbox": "read-only"
})
Performance focus:
mcp__plugin_codex_cli__codex({
"prompt": "Performance review of codex-review.diff:\n- Inefficient algorithms\n- N+1 queries\n- Memory leaks\n- Blocking operations",
"sandbox": "read-only"
})
codex-reply)When you're still working on the same diff, continue the existing thread rather than starting a new codex call. Codex keeps the diff and its prior findings in context; fresh calls lose that.
Typical loop: initial review → Claude implements a fix → codex-reply asking "does the revised code still have the issue?" → Codex confirms or flags new concern → repeat.
Cap at 3–4 rounds total. Diff reviews should converge fast; if you're still going at round 5, stop and surface the remaining disagreement to the user rather than letting the two models debate indefinitely.
threadId is an MCP argument — pass it as the threadId field of codex-reply, not in the prompt text. See ../references/mcp-schema.md for wrong-vs-right examples.
Example — three rounds on the same diff:
# Round 1 — initial review
mcp__plugin_codex_cli__codex({
"prompt": "Review codex-review.diff for bugs, security issues, and missing error handling.",
"sandbox": "read-only"
})
# → threadId: "019da14b-..." / flags: "parseToken doesn't handle malformed JWTs — will throw unhandled."
# Round 2 — Claude fixes and re-exports the updated diff
git diff --cached > codex-review.diff
mcp__plugin_codex_cli__codex-reply({
"threadId": "019da14b-...",
"prompt": "I've re-written codex-review.diff with a fix — please re-read the file. I added a try/catch around parseToken that returns 401 on any JWT parse error. Does this address your concern?"
})
# Round 3 — triage
mcp__plugin_codex_cli__codex-reply({
"threadId": "019da14b-...",
"prompt": "Of the remaining issues, which are merge-blockers vs. nits we can defer?"
})
Start a fresh thread when: reviewing a different diff, the threadId is no longer in context, or the diff has diverged so much that re-priming is cleaner than incremental updates. See ../references/patterns.md.
codex review subcommandDon't use this by default — the MCP flow above is the standard path. codex review is a separate, specialized diff-review subcommand that runs in Bash, doesn't go through MCP, and doesn't support --sandbox. Only reach for it when the user explicitly asks for Codex's built-in review output, or when MCP is unavailable:
codex review --uncommitted
codex review --base main
codex review --commit <sha>
Requires dangerouslyDisableSandbox: true.
sandbox: "read-only".workspace-write, danger-full-access, or --dangerously-bypass-approvals-and-sandbox.If the MCP server is unavailable, see ../references/commands.md for the Bash codex exec form. Requires dangerouslyDisableSandbox: true.
tools
Real-time web research using Google Search via Google's Antigravity (`agy`) CLI — the replacement for the deprecated `gemini-cli`. Trigger when user needs current information ("search with agy", "search with Google Antigravity", "find current info about X with agy", "what's the latest on Y"), library/API research, security vulnerability lookups, or comparisons requiring recent data.
tools
Get Google Antigravity's (`agy`) review of Claude's implementation plans. Trigger when user wants a second opinion on a plan ("have agy review this plan", "get a second opinion from Google Antigravity", "critique this plan with agy"), or after Claude creates a plan file that needs validation before implementation. Replaces the deprecated gemini-cli plan-review workflow.
tools
Get Google Antigravity's (`agy`) code review of git changes after Claude makes edits. Trigger when user wants a second opinion on code changes ("have agy review my changes", "get code review from Google Antigravity", "review this diff with agy"), or as a final check before committing. Replaces the deprecated gemini-cli diff-review workflow.
tools
Deep architectural analysis of the current workspace using Google Antigravity (`agy`). Trigger when the user needs an architecture overview ("analyze this codebase with agy", "map dependencies with Google Antigravity"), is onboarding to unfamiliar code, exploring legacy systems, or hunting technical debt. Replaces the deprecated gemini-cli `codebase_investigator` workflow.