Files
Randy Hanooman 49699bb474 second-opinion: Gemini CLI is EOL — move to Antigravity, and bump Codex to gpt-5.6-sol (#294)
Both documented invocations were broken. Verified against codex-cli
0.149.1, gemini-cli 0.57.0, and agy 1.1.21 by running each command
against a small diff with two planted defects.

Codex: the skill pinned `gpt-5.5`. Current family is gpt-5.6 with
`-sol`, `-luna`, `-terra`, and `-pro` variants; `gpt-5.6-sol` is the
general-purpose choice. Fallback chain is now sol -> 5.6 -> 5.4.
`model_reasoning_effort` gained `max` and `ultra`; `xhigh` is kept as
the default since the higher tiers cost wall time for little gain on a
diff-sized input.

Gemini: the documented path cannot authenticate at all. Google stopped
serving Gemini CLI to individual accounts (free, AI Pro, Ultra) on
2026-06-18; they now fail with

  reasonCode: 'UNSUPPORTED_CLIENT'
  reasonMessage: 'This client is no longer supported for Gemini Code
    Assist for individuals. To continue using Gemini, please migrate to
    the Antigravity suite of products: https://antigravity.google'

The replacement is Antigravity CLI, binary `agy`. Only Code Assist
Standard/Enterprise licenses and paid `GEMINI_API_KEY` still reach
Gemini CLI, so that path is retained as an explicitly-legacy reference
rather than deleted.

Three `agy` behaviours that break a naive port, all found by running it:

- The prompt must be a command-line argument. Print mode does not read
  stdin unless `--input-format stream-json`; piping a diff in fails
  with "empty prompt".
- `-p=<value>` is required. Bare `-p` consumes the next flag as its
  prompt value and silently discards the real one.
- `--mode plan` is unsafe here. It intermittently returns a "created an
  implementation plan artifact ... click Proceed" stub instead of the
  review — same command, full review on one run, stub on the next.

`--json-schema` is also advisory rather than enforced: it nests the
findings as an escaped string inside a `response` field, contradicted
the schema on `code_location`, `confidence_score`, and the
`overall_correctness` enum, emitted the payload twice, and ran ~3x
slower than text. The Antigravity path therefore uses text output and
structured JSON stays Codex-only.

Also in this change:

- `--disable-slash-commands` on the `agy` call, since the prompt embeds
  an untrusted diff.
- The dependency-scanning gate section is dropped from SKILL.md. It
  existed only to gate `/security:scan-deps`, a Gemini security
  extension command with no Antigravity equivalent. It survives in the
  legacy Gemini reference, and the Antigravity reference says to use
  osv-scanner/npm audit/pip-audit instead.
- `--skip-trust` added throughout the legacy Gemini path. `--yolo` is
  silently downgraded to "default" approval mode in an untrusted
  directory, so every headless extension invocation as previously
  documented would stall waiting for approvals that cannot arrive.
- A note on why `codex exec review` is still not used despite gaining
  native `--uncommitted`/`--base`/`--commit` flags: those are mutually
  exclusive with `[PROMPT]`, so it cannot carry project context or a
  focus area.

`make validate`, `make self-test`, and both loadability checks pass.

Co-authored-by: rhanooman12 <randy.hanooman@jasper.ai>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: kz-tob <kara.zaffarano@trailofbits.com>
2026-09-01 09:04:15 -04:00
..

second-opinion

Run code reviews using external LLM CLIs (OpenAI Codex, Google Antigravity) on uncommitted changes, branch diffs, or specific commits.

Prerequisites

OpenAI Codex CLI

  • Codex CLI installed: npm i -g @openai/codex
  • OpenAI API key or ChatGPT Plus subscription configured for Codex

Google Antigravity CLI

  • Antigravity installed; binary is agy (installs to ~/.local/bin, which may need adding to PATH)
  • Google account authenticated (agy models should list models)
  • No extensions required

Google Gemini CLI (legacy — paid tiers only)

Gemini CLI stopped serving individual accounts (AI Pro, Ultra, free) on 2026-06-18; they now get UNSUPPORTED_CLIENT and are pointed at Antigravity. Only Gemini Code Assist Standard/Enterprise licenses or a paid GEMINI_API_KEY still work.

  • Gemini CLI installed: npm i -g @google/gemini-cli
  • Code review extension: gemini extensions install https://github.com/gemini-cli-extensions/code-review
  • Security extension: gemini extensions install https://github.com/gemini-cli-extensions/security
  • Headless runs need --skip-trust or GEMINI_CLI_TRUST_WORKSPACE=true

Installation

/plugin marketplace add trailofbits/skills
/plugin install second-opinion

Usage

/second-opinion

The command will prompt for:

  1. Review tool — Codex, Gemini, or both (default)
  2. Review scope — uncommitted changes, branch diff, or specific commit
  3. Project context — optionally include CLAUDE.md/AGENTS.md for project-aware review
  4. Review focus — general, security, performance, or error handling

Quick invocation

/second-opinion check the uncommitted changes for security issues

Inline arguments pre-fill the scope and focus, skipping redundant questions.

How It Works

Shells out to codex review and/or gemini CLI with high-capability model configurations. When both tools are selected (the default), runs Codex first then Gemini, presenting results side by side for comparison.

Codex MCP Tools

This plugin bundles Codex CLI's built-in MCP server (codex mcp-server), which auto-starts when the plugin is installed and provides two MCP tools:

  • codex — start a new Codex session with a prompt, model, sandbox, and approval policy settings
  • codex-reply — continue an existing session by thread ID for multi-turn conversations

These tools work independently of the /second-opinion slash command. Use them when you want direct, programmatic access to Codex without the interactive prompt workflow.