setup

A setup tool that checks whether the Gemini CLI or AGY command-line tool is ready and manages a review check that runs when work stops.

In plain words
What is it for?
Use it to choose or detect the engine, test Gemini or AGY availability, and turn the stop-time review gate on or off.
Why use it?
It avoids unsafe or invalid command options and makes the selected tool and review setting explicit.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/arcobaleno64/agy-plugin-cc/setup
Clone the repo
git clone --depth 1 https://github.com/arcobaleno64/agy-plugin-cc
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.02252
Opus 5 $0.00009 $0.01126
Sonnet 5 $0.00003 $0.00450
Haiku 4.5 $0.00002 $0.00225

Measured yesterday against content hash 55161ffe7c26, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

setup scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://antigravity.google/cli/install.sh | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Bash(node:*), Bash(npm:*), Bash(curl:*), AskUserQuestion
plugins/gemini/commands/setup.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Those arguments must never reach a shell

$ARGUMENTS is substituted into this file as text, so a shell receiving it would evaluate whatever it contains — $(…), backticks, ;, |. Measured on the job commands: $(echo INJECTED) was executed before Node ever started.

Read the argument text, then assemble the command from fixed pieces only. Never place the argument text, or any fragment of it, into a command, and never pass it as a single quoted string. Every value below must be one you checked against its list and then wrote out yourself — chosen, never copied:

  • --engine <value>: auto, gemini, agy
  • --probe-agy, --probe-gemini, --enable-review-gate, --disable-review-gate, --json: literal flags, no value

If a value is not in its set, stop and say so rather than passing it through to find out.

Run this exactly as written — --json belongs inside the quoted argument string. A token placed beside that quoted string makes it a second argv element, and every flag inside it is then read as one positional and ignored, which is how /gemini:setup --engine gemini came back reporting a different engine:

node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json [verified flags]

Gemini CLI and AGY are first-class supported engines. Each is a conditional dependency: the user only needs the binary for the engine they select. In auto mode Gemini is checked first because it exposes the plugin's JSON/model contract, then AGY is checked; that order does not make AGY an optional or lower-tier integration. Drive the install decisions below off the setup JSON's requestedEngine field, which already resolves both the --engine flag and the GEMINI_ENGINE environment variable — do not branch on the raw $ARGUMENTS text.

If the result says Gemini CLI is unavailable (gemini.available is false), npm is available, and requestedEngine is not agy:

  • Use AskUserQuestion exactly once to ask whether Claude should install Gemini CLI now.
  • Put the install option first and suffix it with (Recommended).
  • Use these two options:
    • Install Gemini CLI (Recommended)
    • Skip for now
  • If the user chooses install, run:
npm install -g @google/gemini-cli
  • Then rerun:
node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json [verified flags]

When requestedEngine is agy and AGY is unavailable (agy.available is false):

  • Use AskUserQuestion exactly once to ask whether Claude should install AGY now.
  • Put the install option first and suffix it with (Recommended).
  • Use these two options:
    • Install AGY (Recommended)
    • Skip for now
  • If the user chooses install, run:
curl -fsSL https://antigravity.google/cli/install.sh | bash
  • Then rerun:
node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json [verified flags]

Do not ask about installation when:

  • the selected engine is already available (even if it still needs authentication), or
  • Gemini CLI is the missing selected/auto candidate and npm is unavailable, or
  • the only missing engine is AGY and requestedEngine is not agy. In that case AGY is not the selected conditional dependency, so do not push its installation.

When requestedEngine is agy and AGY is unavailable, the AGY install prompt above takes precedence even if Gemini CLI is already present — the user routed to AGY (via --engine agy or GEMINI_ENGINE=agy), so do not silently fall back to Gemini.

AGY authentication cannot be read off disk, so an unprobed --engine agy reports readyState: "partial" with agyAuth.state: "unknown" — that is "not checked", not "not signed in". When the user asks whether AGY is ready, or when they are about to act on a partial verdict, rerun with --probe-agy:

node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json --probe-agy [verified flags]

It asks AGY a read-only question the account has to answer, so it verifies the login without starting a turn or spending quota (AGY 1.1.11+; below that it declines and says so). A verified AGY then reports readyState: "ready"; a probe that comes back logged-out reports not-ready, and the fix is to run agy once interactively — or to use one of AGY's non-interactive credentials (ADC and Enterprise/WIF on 1.1.10+, GEMINI_API_KEY with modelProvider: "gemini" on 1.1.13+).

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 172 lines · 17 tokens per session scan C 55161ffe7c26

Subscribe to this mod's changes

setup is a command published in the GitHub repository arcobaleno64/agy-plugin-cc (10 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 2,252 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.