| name | anti-nanobanana |
| description | Generate or edit images from Codex/Claude using Antigravity OAuth credentials and the Nano Banana Pro image model. Use when the user wants image generation without a Gemini API key via Antigravity/OpenClaw/opencode OAuth, or wants to inspect/check Antigravity image auth. |
| metadata | {"short-description":"Antigravity OAuth Nano Banana image generation"} |
Anti Nano Banana
Generate or edit images without API keys through OAuth-backed paths:
agy native Antigravity CLI image tool.
- Antigravity/OpenClaw OAuth against Antigravity CloudCode.
- Google Cloud ADC OAuth against Vertex AI, when a Google Cloud project has Vertex AI enabled.
Use the bundled script from the user's current working directory so outputs are saved in the active project, not the skill folder.
Quick commands
Generate:
python3 {baseDir}/scripts/antigravity_nano_image.py \
--backend agy \
--prompt "이미지 설명" \
--filename "yyyy-mm-dd-hh-mm-ss-name.png" \
--aspect-ratio 1:1 \
--resolution 1K
Generate through Google Cloud ADC OAuth only (no API key):
python3 {baseDir}/scripts/antigravity_nano_image.py \
--backend vertex-adc \
--vertex-project "your-gcp-project-id" \
--prompt "이미지 설명" \
--filename "nano-banana.png" \
--aspect-ratio 1:1 \
--resolution 1K
Edit or compose images:
python3 {baseDir}/scripts/antigravity_nano_image.py \
--prompt "수정 지시" \
--filename "edited.png" \
-i input1.png -i input2.jpg \
--aspect-ratio 16:9 \
--resolution 2K
Check credentials without generating:
python3 {baseDir}/scripts/antigravity_nano_image.py --check-auth --json
List visible Antigravity models/quota:
python3 {baseDir}/scripts/antigravity_nano_image.py --list-models --json
Official Antigravity CLI install and login
This skill should prefer the official Antigravity CLI (agy) OAuth session and must not require Gemini API keys.
If agy is missing, tell the user to install it with the official command for their platform.
macOS / Linux / WSL:
curl -fsSL https://antigravity.google/cli/install.sh | bash
Windows PowerShell:
irm https://antigravity.google/cli/install.ps1 | iex
Windows Command Prompt:
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
Verify install/login:
agy --print-timeout 5m --print "Say only OK."
Auth sources
For --backend auto or --backend antigravity, the script searches in this order:
- Environment variables:
ANTIGRAVITY_REFRESH_TOKEN, GOOGLE_ANTIGRAVITY_REFRESH_TOKEN, optional ANTIGRAVITY_PROJECT_ID, optional ANTIGRAVITY_ACCESS_TOKEN
- Explicit
--credential-file PATH
- Community/agent credential files:
~/.openclaw/agents/main/agent/auth-profiles.json
~/.openclaw/auth-profiles.json
~/.openclaw/credentials/google-antigravity.json
~/.config/openclaw/credentials/google-antigravity.json
~/.config/opencode/antigravity-accounts.json
~/.config/anti-nanobanana/google-antigravity.json
~/.opencode/antigravity-accounts.json
~/.gemini/oauth_creds.json
~/.gemini/antigravity-cli/oauth_creds.json
~/.gemini/antigravity-cli/credentials.json
For --backend auto or --backend vertex-adc, the script uses local Google Cloud OAuth:
gcloud auth application-default print-access-token
- fallback:
gcloud auth print-access-token
- project from
--vertex-project, GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT, or gcloud config get-value project
If the user is not authenticated, ask them to log in with their existing Antigravity-compatible tool, for example:
openclaw models auth login --provider google-antigravity
Advanced direct CloudCode OAuth helper. Prefer official agy login. The helper is intentionally not preloaded with an OAuth client; set ANTIGRAVITY_CLIENT_ID and ANTIGRAVITY_CLIENT_SECRET yourself only if you know what you are doing:
ANTIGRAVITY_CLIENT_ID="..." ANTIGRAVITY_CLIENT_SECRET="..." \
python3 {baseDir}/scripts/antigravity_oauth_login.py --start
ANTIGRAVITY_CLIENT_ID="..." ANTIGRAVITY_CLIENT_SECRET="..." \
python3 {baseDir}/scripts/antigravity_oauth_login.py --code "4/..."
Gemini CLI vs Antigravity OAuth
Gemini CLI oauth-personal credentials can be detected from ~/.gemini/oauth_creds.json, but they may not be authorized for Antigravity CloudCode image generation. If --check-auth succeeds but generation returns PERMISSION_DENIED, the user likely logged in to Gemini CLI rather than Antigravity/OpenClaw. In that case, log in with Antigravity CLI or an Antigravity-compatible provider and rerun --check-auth.
Gemini/Google AI Pro subscription login is not the same as Antigravity CloudCode or Vertex AI authorization. This skill intentionally avoids API keys; if Antigravity CloudCode returns RESOURCE_EXHAUSTED, use a different logged-in Antigravity account, wait for image quota reset, or use Vertex AI with gcloud OAuth and an enabled/billable Google Cloud project.
Options
--prompt, -p: required unless using --check-auth or --list-models; generation/edit prompt.
--filename, -f: required unless using --check-auth or --list-models; output path.
--input-image, -i: repeatable input images for editing/composition.
--aspect-ratio, -a: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9.
--resolution, -r: 512, 1K, 2K, 4K.
--model: default gemini-3.1-flash-image.
--fallback-model: default MODEL_PLACEHOLDER_M21.
--backend: auto (default), agy, antigravity, or vertex-adc.
--vertex-model: default gemini-3-pro-image-preview.
--vertex-fallback-model: default gemini-2.5-flash-image.
--vertex-project: Google Cloud project for Vertex AI OAuth.
--vertex-location: default global.
--endpoint: override/add CloudCode endpoint; repeatable.
--list-models: list visible CloudCode models/quota without generating. Use --backend antigravity --list-models --json for quota fraction/reset metadata.
--credential-file-only: use only --credential-file plus env credentials.
--no-postprocess-size: keep the native model output dimensions instead of crop/resizing to the requested aspect ratio/resolution.
--json: machine-readable output.
Operating rules
- Prefer
--backend agy for API-key-free generation. It uses the official Antigravity CLI session and copies files back from Antigravity scratch storage when needed.
- The
agy native image tool can ignore exact ratio/size requests. By default, the script validates and postprocesses the final file to the requested aspect ratio/resolution.
- Prefer 1K drafts, then 2K/4K final once the prompt is stable.
- Preserve the user's creative wording; only tighten prompts when the request is ambiguous.
- For edits, instruct the model what to change and what to preserve.
- Do not print secrets or token values. If auth fails, report only the credential source/email and error class.
- The script prints
MEDIA:<path> for agent UIs that auto-attach generated files.
- This uses OAuth-only paths. Do not require or request Gemini API keys for this skill.