brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
antigravity-2Connect Codex to local Antigravity 2.0 through a CLI-first low-RAM bridge, plus desktop UI setup checks, model limits, project/chat inspection, and safe conversation handoff when UI state is needed.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when the user asks Codex to connect to, set up, inspect, compare, or automate the local Antigravity 2.0 desktop app.
Core jobs:
Primary operating model:
submit-agy-job first. It uses official Antigravity CLI print mode and writes durable bridge jobs under .antigravity-bridge/jobs/<jobId>/.result.md, changed-files.txt, diff.patch, test-output-summary.md, and status.json.This plugin exposes two MCP servers:
antigravity-local: direct tools for quick, setup, doctor, status, open, repair-live, inspect, live, devtools-health, submission-guide, prepare-offload, create-job, submit-job, agy-status, agy-models, submit-agy-job, list-jobs, read-job, cancel-job, retry-job, switch-model, submit-offload, limits-summary, limits, models, offload-advice, handoff-template, and privacy.antigravity-devtools: Chromium DevTools controls for inspecting and driving the Antigravity UI.Prefer antigravity-local.submit-agy-job for nontrivial coding/workspace work unless the task requires visible desktop project/chat state. It creates a durable .antigravity-bridge/jobs/<jobId>/ folder, runs official Antigravity CLI print mode, avoids desktop RAM overhead, and lets Codex stop watching the UI. Use antigravity-local.read-job later to read only the artifact files. Use antigravity-local.submit-job only when a visible Antigravity project/chat must be used. Use antigravity-local.submit-offload only for lightweight selected-chat handoffs that do not need a durable job folder. If Sonnet/Opus/GPT-OSS is exhausted in desktop UI, do not wait for the user to say so: call antigravity-local.switch-model with modelPreference=flash-medium or pass modelPreference=flash-medium to submit-job / submit-offload. If the MCP tool list is stale and does not show the job/model tools, use the PowerShell helper equivalents before falling back to DevTools choreography. Use antigravity-local.prepare-offload when Codex should first show the plan or when the selected chat is uncertain. For any nontrivial workspace, repo, browser, UI, research, planning, debugging, review, implementation, or job-application task, default to Antigravity for exploration and long reasoning, while Codex stays the planner, safety gate, patch reviewer, and final summarizer. Use antigravity-local.quick for general setup checks. If ReadyForLiveUiInspection is false or PageCount is zero, call antigravity-local.repair-live once before using DevTools. If repair-live restarts Antigravity, do not keep using an already-started stale DevTools MCP connection; let it reconnect to the new port before UI calls. If antigravity-devtools fails with Transport closed, do not repeatedly call list_pages in that session. Call antigravity-local.devtools-health; if it reports pages are ready, restart Codex to recreate the DevTools MCP transport or use handoff-template for a manual paste this turn. Use limits-summary for normal quota checks and full limits only when complete per-model JSON is needed. Use antigravity-devtools for project/chat selection only when the selected chat is not already correct. If this skill file cannot be read in a Codex session, run the PowerShell helper fast path.
Existing-chat rule: if the user asks for an existing project/chat, do not create or use a new chat. expectedChat must match the active Antigravity document title before model switching or submission. If the helper reports expectedChatActiveTitle or activeExistingChat, stop and select the correct existing chat before submitting.
Submission rule: do not report success or wait for artifacts unless the helper returns Submitted: true. If it returns Submitted: false, ComposerStillHasPrompt: true, or submit_failed, tell the user the prompt was not accepted and fix selection/submission first.
Startup rule: plugin MCP startup must be passive. Do not open, close, restart, or repair Antigravity just because Codex opened. agy-status and agy-models are passive and do not open desktop UI. Only call open, repair-live, switch-model, submit-job, or submit-offload after the user asks to use desktop Antigravity or the task explicitly requires visible UI state.
%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe.%APPDATA%\Antigravity.%USERPROFILE%\plugins\antigravity-2.PATH when using the bundled chrome-devtools-mcp bridge.The helper scripts compute %LOCALAPPDATA%, %APPDATA%, and %USERPROFILE% at runtime. Do not hardcode another user's home directory, ports, project names, chats, email addresses, or runtime tokens.
After a user clones the GitHub repo into %USERPROFILE%\plugins\antigravity-2, run:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" setup
Use the setup report to decide the next step:
Installed is false, ask the user to install Antigravity or provide its install path.Node.Found is false, install or expose Node.js on PATH before using the DevTools bridge.AntigravityRunning is false, run the open command.ReadyForModelLimits is false after opening Antigravity, wait a few seconds and rerun setup.ReadyForLiveUiInspection is false, run repair-live once. It restarts Antigravity, clears a stale DevToolsActivePort, and waits for inspectable pages. Use Browser/Computer Use fallback only if repair still cannot connect.Check status:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" status
Fast combined readiness and quota summary:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" quick
Open Antigravity:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" open
Repair live DevTools inspection if Antigravity is running but exposes zero pages:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" repair-live
Generate a compact handoff prompt without touching the UI:
Call antigravity-local.handoff-template with goal, workspace, statusFile, and nextStep.
Check whether a task should be offloaded before using UI tokens:
Call antigravity-local.offload-advice with goal, hasWorkspaceWork, and estimatedCodexInputTokens.
Prepare the whole token-saving handoff in one call:
Call antigravity-local.prepare-offload with goal, workspace, statusFile, nextStep, hasWorkspaceWork, and estimatedCodexInputTokens.
Create and submit a durable bridge job:
Call antigravity-local.submit-job with goal, workspace, mode, nextStep, expectedProject, expectedChat, modelPreference=auto, and submit=true.
Create and submit a low-RAM Antigravity CLI job, without opening desktop UI:
Call antigravity-local.agy-status.
Call antigravity-local.submit-agy-job with goal, workspace, mode, nextStep, model=gemini-3.5-flash-low, and start=true.
Read job results without reading the Antigravity chat:
Call antigravity-local.list-jobs with workspace.
Call antigravity-local.read-job with workspace and jobId=latest.
Use modes:
fast: inspect only directly relevant files, make the smallest safe change, run targeted verification.deep: inspect related modules and prior patterns, run the strongest practical tests, include risks.review: inspect and report only; do not edit.patch: make a narrow safe edit, run relevant verification, produce a diff.Switch the selected Antigravity chat to a cost-saving available model:
Call antigravity-local.switch-model with modelPreference=flash-medium, expectedProject, and expectedChat.
Submit the handoff in one call when the correct Antigravity chat is already selected:
Call antigravity-local.submit-offload with goal, workspace, statusFile, nextStep, expectedProject, expectedChat, modelPreference=auto, and submit=true.
Use expectedProject and expectedChat when known. If either expected string is not visible, submit-offload stops before filling or submitting.
Use modelPreference=flash-medium when the user wants Flash or when a quota warning/exhausted Sonnet/Opus model is visible. submit-offload refuses to submit if it cannot verify the chosen model.
Use submit=false for verify-only; it must not fill the composer. Use fillOnly=true only when the user wants to manually review the handoff before sending.
If MCP submit-offload is not visible in the current Codex session, use the raw helper:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" switch-model -ModelPreference flash-medium -ExpectedProject "<project text>" -ExpectedChat "<chat text>"
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" submit-offload -Goal "<goal>" -Workspace "<path>" -StatusFile "notes/antigravity-status.md" -NextStep "<next step>" -ExpectedProject "<project text>" -ExpectedChat "<chat text>" -ModelPreference auto -Submit true
If MCP tools are unavailable and Codex can only run shell commands, use the PowerShell helper equivalent:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" agy-status
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" submit-agy-job -Goal "<goal>" -Workspace "<path>" -Mode fast -NextStep "<next step>" -AgyModel gemini-3.5-flash-low
Inspect integration details:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" inspect
Inspect the live DevTools connection:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" live
Check DevTools transport health after Transport closed:
Call antigravity-local.devtools-health.
Check how to submit a chat prompt without invalid key names:
Call antigravity-local.submission-guide.
Report model limits:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" limits-summary
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" models
limits is an alias for models.
Use limits-summary unless full per-model JSON is required.
Run the public-repo privacy scanner:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" privacy
Use models or limits for model quota checks. The helper discovers the running Antigravity language_server.exe, reads its CSRF token from the local process command line, finds its local HTTPS gRPC-web port, and calls:
exa.language_server_pb.LanguageServerService/GetAvailableModelsexa.language_server_pb.LanguageServerService/GetLoadCodeAssistThis is the same local language-server surface the Antigravity Models tab uses. It returns per-model quota fraction/reset metadata and AI credit tier data when Antigravity exposes it. It is not a raw all-model token ledger unless Antigravity exposes one through these responses.
Do not parse old chats, task transcripts, or logs for model limits except as supporting evidence after the language-server path fails.
For project and chat work, the live UI is the source of truth.
Preferred path:
setup or live to confirm DevTools readiness.antigravity-devtools when available. It starts Antigravity's bundled chrome-devtools-mcp and connects through DevToolsActivePort.If antigravity-devtools/list_pages or another DevTools tool fails with Transport closed, the child MCP process has died. This is a transport failure, not proof that Antigravity is unavailable. Call antigravity-local.devtools-health to confirm the live pages. If pages are ready, restart Codex before trying DevTools again; if the user wants to continue immediately, use antigravity-local.handoff-template and ask for manual paste into Antigravity.
Manual DevTools endpoint check:
$port = (Get-Content "$env:APPDATA\Antigravity\DevToolsActivePort")[0]
Invoke-RestMethod "http://127.0.0.1:$port/json/list"
If DevTools cannot interact with a native dialog or OS-level control, use the Computer Use plugin as a fallback.
Use DevTools to inspect the live Antigravity project list, selected project, conversation list, and conversation titles. If the UI has a project or conversation search control, use it rather than reading private storage first.
Storage under %APPDATA%\Antigravity\User can support investigation, but live UI remains authoritative.
Before submitting:
models if the user asks about limits or if a quota warning is visible.Then paste the user's instruction into the composer and submit it. Report whether Antigravity accepted the message, started working, requested confirmation, or showed a quota/error state.
Submission reliability:
submitKey.Enter.Control+Enter, Ctrl+Enter, or chord strings unless the active tool schema explicitly lists that exact value. Some DevTools tools reject those strings with Unknown key.handoff-template or report the blocker.Before submitting:
Then submit the user's initial prompt. Report the new conversation title or visible identifier if Antigravity shows one.
Before creating:
After creation, verify the project is selected, then start a chat if requested.
Inspect the active page text and state through DevTools. Summarize:
Do not expose unrelated private chat content unless the user asked for that specific context.
Use Antigravity as an offload worker when the user wants to save Codex tokens or asks Codex to "ride on" Antigravity.
Run antigravity-local.prepare-offload before opening or driving the Antigravity UI unless the user explicitly asks to inspect the live UI. This is the cheapest token-saving step because it replaces several separate checks.
Do not offload:
Do offload:
Cost split:
Important lesson from project chats: Antigravity may automatically inspect attached folders before answering, even for a tiny prompt. That is useful for real project work but wasteful for tests like 2+2. If Antigravity starts broad folder exploration for a small task, cancel it and report that offload is not token-efficient.
Core rule:
Do not copy large files, long logs, full source, or full Antigravity chat transcripts into Codex. Savings happen only when Codex sends compact instructions, lets Antigravity inspect the workspace locally, and reads back a small artifact or status checkpoint.
Fast preferred flow:
antigravity-local.agy-status, optionally agy-models, then submit-agy-job; read artifacts with read-job.antigravity-local.submit-job with submit=true, modelPreference=auto, and expected visible project/chat text.antigravity-local.switch-model with modelPreference=flash-medium first.antigravity.ps1 submit-agy-job / antigravity.ps1 submit-job / antigravity.ps1 switch-model with the same fields.antigravity-local.prepare-offload, then use DevTools only to select the project/chat; use switch-model for the model.codex-direct, do not open or drive Antigravity.submit-agy-job or submit-job, stop watching every step. Read only the job artifacts with read-job.retry-job with the exact missing point. Do not pull broad context back into Codex unless needed for final verification.Detailed fallback flow:
antigravity-local.quick.ReadyForLiveUiInspection is false, run antigravity-local.repair-live once.antigravity-local.offload-advice with the goal. Continue only if the decision is offload-to-antigravity.antigravity-local.limits-summary; avoid full limits unless model-level JSON is actually needed.antigravity-local.switch-model with modelPreference=auto or flash-medium; this is mandatory when Sonnet/Opus/GPT-OSS is exhausted.antigravity-devtools only if needed to verify the target project, chat, idle composer, and whether workspace context is appropriate.antigravity-local.submission-guide, then send Antigravity a compact handoff prompt with only the goal, workspace/path, constraints, next step, and required output format.If DevTools UI submission fails because a stale port is still attached, do not spend more tokens probing CDP from Codex. Use antigravity-local.handoff-template to prepare the compact prompt, report that UI submission was blocked by stale DevTools, and ask the user to restart Codex or paste the handoff manually. The next Codex session should load the new DevTools port.
Recommended handoff prompt:
Goal: <goal>
Workspace: <path>
Constraints: inspect files locally; do not paste full files, full logs, or full source; use search before reading whole files.
Token rule: work token-efficiently; write progress to <small-status-file>; output max 10 bullets plus changed file list.
Next step: <specific next action>
If blocked: ask one concise question; otherwise continue autonomously.
Recommended artifacts:
notes/antigravity-status.mdplans/antigravity-next.mdreports/antigravity-result.jsonWhen checking back, Codex should read only the artifact, targeted diffs, or a compact visible UI status. Do not ask Antigravity to restate the whole conversation. Use delta prompts such as:
Continue from reports/antigravity-result.json. Only fix the failing item. Return max 5 bullets and changed file paths.
Report back to the user with:
Before committing or publishing:
powershell -ExecutionPolicy Bypass -File "$HOME\plugins\antigravity-2\scripts\antigravity.ps1" privacy
git diff --check
Also run a local targeted scan for any private terms the current user mentions. Do not commit names, emails, project names, runtime ports, CSRF tokens, OAuth tokens, cookies, logs, screenshots, or Antigravity user data.