Skip to content

About

Antigravity (AGY) plugin using local Codex CLI for code reviews & delegated tasks — ported and extended from openai/codex-plugin-cc. | Antigravity (AGY) 插件,调用本机 Codex 执行代码审查与任务委派(移植自 codex-plugin-cc 并持续增强)。

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Codex Plugin for Antigravity (codex-plugin-agy)

English | 简体中文

Use your local Codex CLI from inside Antigravity (AGY) for code reviews, adversarial design reviews, or delegated coding tasks — originally ported from OpenAI's official openai/codex-plugin-cc and continuously enhanced beyond a 1:1 port for Antigravity and real-world engineering workflows.

Note

Architecture & Quota Notice: This plugin uses a pure rules + skills layout and registers no custom/plugin agents (agents/). Everything runs directly in Antigravity's default main agent via local Codex CLI, avoiding extra subagent forwarding token overhead and always staying on the default main-agent rate (while Google has since reverted the 4× custom/plugin agent quota multiplier introduced in agy 1.5.17+ — see antigravity-cli#1890 — running in the default main agent keeps the plugin insulated from similar policy changes). When upgrading from v1.1.0 or earlier, git pull or re-running the installer automatically removes the legacy agents/ directory.

What You Get

  • codex-review skill for standard read-only Codex code review (working tree or branch diff)
  • codex-adversarial-review skill for steerable challenge reviews questioning design choices, tradeoffs, and failure modes
  • codex-rescue skill to delegate investigations, fixes, or follow-up work directly to Codex
  • codex-jobs skill (status, result, cancel, stop-broker) to track and manage background Codex runs
  • codex-setup skill to check local Codex CLI availability and authentication
  • gpt-5-4-prompting skill + reference library for structured Codex / GPT-5.4 prompting
  • Shared codex app-server broker with automatic idle shutdown and detached background workers for both review and task runs

Requirements

  • ChatGPT subscription (incl. Free) or OpenAI API key configured in local Codex CLI (codex login)
  • Codex CLI with codex app-server support (npm install -g @openai/codex)
  • Node.js 18.18 or later (macOS, Linux, WSL2, and Windows supported)

Install & Uninstall

No npm install, build step, or manual edits to ~/.gemini/config/config.json are required. Antigravity automatically discovers the plugin on the next turn once it is placed in ~/.gemini/config/plugins/codex-plugin-agy.

Option 1: Ask Antigravity to install it (Recommended)

Paste this prompt directly into Antigravity:

Install the codex-plugin-agy plugin from https://github.com/yuhhhong/codex-plugin-agy into ~/.gemini/config/plugins/codex-plugin-agy (keep existing plugins and do not hand-edit config.json). After installing, run its setup --json check to verify Node, Codex CLI, and login status, then report the result.

Option 2: Direct git clone (One command, easy updates)

macOS / Linux / WSL2:

git clone https://github.com/yuhhhong/codex-plugin-agy.git ~/.gemini/config/plugins/codex-plugin-agy

Windows (PowerShell):

git clone https://github.com/yuhhhong/codex-plugin-agy.git "$env:USERPROFILE\.gemini\config\plugins\codex-plugin-agy"

To update later, pull inside the plugin directory:

git -C ~/.gemini/config/plugins/codex-plugin-agy pull

Option 3: Installer script (ZIP download or local development)

If you downloaded a ZIP archive or cloned the repo elsewhere, run the cross-platform installer (copies plugin files by default, so deleting the source folder later will not break the plugin):

macOS / Linux / WSL2:

sh ./install.sh              # copy install (default)
sh ./install.sh --link       # symlink install for local development
sh ./install.sh --uninstall  # uninstall

Windows (PowerShell):

powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1              # copy install (default)
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Link        # junction install for local development
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall   # uninstall

Option 4: Antigravity CLI (agy)

If you use the agy CLI:

agy plugin validate --strict .
agy plugin install .

Uninstall

Run the uninstall flag above, or simply remove ~/.gemini/config/plugins/codex-plugin-agy (%USERPROFILE%\.gemini\config\plugins\codex-plugin-agy on Windows).

Usage

Once enabled, you can trigger the plugin naturally in Antigravity (or run the companion CLI directly):

Check setup

Ask Antigravity to check Codex setup (triggers codex-setup), or run:

node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs setup

If Codex is installed but not logged in yet, run codex login in your terminal.

Standard review (codex-review)

Runs Codex's built-in reviewer (read-only) against uncommitted working-tree changes or a branch diff (--base <ref>). Supports --wait and --background.

node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs review --wait
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs review --background --base main

Adversarial review (codex-adversarial-review)

Runs a steerable challenge review that pressure-tests assumptions, tradeoffs, race conditions, rollback safety, and failure modes. Accepts optional focus text after flags.

node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs adversarial-review --wait "challenge the caching and retry design"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs adversarial-review --background --base main "audit concurrency and data consistency"

Delegate tasks (codex-rescue)

Hands debugging, investigation, or implementation tasks directly to Codex via the codex-rescue skill. Supports --write, repeatable --add-dir <dir> (for multi-repo or Git worktree edits in one session), --cwd <dir> / -C <dir>, --background, --resume-last, --model <model|spark>, and --effort <none|minimal|low|medium|high|xhigh>.

node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --write "fix the failing unit test with the smallest safe patch"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --write --add-dir ../sibling-repo --add-dir ../worktree-dir "update the shared API contract across repos"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --cwd ../sibling-repo --write "fix validation only inside the target repo"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --background --write "investigate and fix the flaky integration test"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --resume-last --write "apply the top fix from the last run"

Note: --model spark maps to gpt-5.3-codex-spark. Leave --model and --effort unset to use your Codex defaults from ~/.codex/config.toml or .codex/config.toml.

Manage background jobs (codex-jobs)

node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs status
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs status <job-id> --wait
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs result <job-id>
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs cancel <job-id>
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs stop-broker

Completed tasks also print codex resume <session-id> so you can continue the thread directly in the Codex CLI or App.

Relationship to Upstream openai/codex-plugin-cc

This project started as a port of openai/codex-plugin-cc and evolves independently for Antigravity and practical development workflows:

  1. Native Antigravity Plugin Layout: Uses root plugin.json, rules/AGENTS.md, and skills/*/SKILL.md (with no custom/plugin agents/), persisting state under ~/.gemini/config/plugin-data/codex-plugin-agy/state with no Claude-specific paths or env vars.
  2. Runtime & Job Management Enhancements: Adds unified detached background workers for both tasks and reviews (task-worker / review-worker), automatic idle broker shutdown with stop-broker, and cross-workspace job tracking.
  3. Ongoing Workflow Extensions & Trimming: Omits Claude-specific features (transfer and Claude hooks.json) while adding Antigravity-focused improvements such as multi-repository and Git worktree support.

For complete flags, refer to node scripts/codex-companion.mjs --help and skills/*/SKILL.md. For version-by-version additions and fixes, see CHANGELOG.md or GitHub Releases.

License & Attribution

Ported from openai/codex-plugin-cc under the Apache License 2.0. Original LICENSE and NOTICE files are preserved.

About

Antigravity (AGY) plugin using local Codex CLI for code reviews & delegated tasks — ported and extended from openai/codex-plugin-cc. | Antigravity (AGY) 插件,调用本机 Codex 执行代码审查与任务委派(移植自 codex-plugin-cc 并持续增强)。

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages