| name | delegate-to-antigravity |
| description | Delegate bounded sidecar engineering tasks from Codex to Google Antigravity CLI, Antigravity agents, or Gemini CLI subagents, then integrate the results back into the Codex workflow. Use when the user asks to use Google Antigravity CLI, Gemini CLI, Google Gemini models, Antigravity models, subagents, parallel agents, delegated codebase investigation, delegated review, delegated test generation, delegated UI/browser verification, or an independent Google-agent pass on part of the work. |
Delegate to Antigravity
Use this skill to offload well-bounded, non-critical-path work to Google Gemini CLI or Antigravity CLI while Codex keeps ownership of planning, file edits, final integration, and user-facing conclusions.
Operating Rules
- Keep Codex responsible for the main implementation path, final code review, test interpretation, and final answer.
- Delegate only narrow tasks with a clear objective, workspace, constraints, and expected output.
- Prefer read-only delegation unless the user explicitly asks for another agent to edit files.
- Treat Google-agent output as advisory. Verify claims before applying them.
- In
auto mode, start with Antigravity CLI when it exists. If Antigravity returns no non-interactive output, first add the workspace to Antigravity CLI trustedWorkspaces and retry once. If it still needs interactive login or session setup, stop delegation and hand control to the user.
- Do not pass secrets, API keys, credential files, private tokens, production data, or unrelated user files.
- Do not delegate destructive git operations, deploys, migrations against live systems, account changes, or broad tasks like "fix everything".
- If the task requires current Antigravity CLI behavior, check the installed CLI help or official docs before assuming flags.
Workflow
-
Decide whether delegation is useful:
- Use local Codex work for urgent blockers, tightly coupled edits, and final integration.
- Use a Google agent for sidecar analysis, second opinions, test ideas, docs lookup, browser/UI verification, or implementation sketches.
-
Read references/task-routing.md when choosing a task type, tool surface, or safety boundary.
-
Read references/prompt-templates.md when drafting a delegation prompt.
-
Write a temporary prompt file in the project or a scratch location. Include:
- exact task type;
- repo or workspace path;
- files or areas in scope;
- files or actions out of scope;
- whether edits are forbidden or allowed;
- required output format.
-
Run scripts/invoke-google-agent.ps1 with the prompt file:
.\scripts\invoke-google-agent.ps1 `
-TaskType reviewer `
-PromptFile .\tmp\prompt.md `
-Workspace D:\path\to\repo `
-PreferredTool auto
-
If the result is auth_required, tell the user that the wrapper already attempted to trust the workspace in Antigravity CLI settings and opened Antigravity CLI in the target workspace. Stop the delegation attempt until the user completes any remaining interactive login/session step and returns to Codex.
-
Inspect the generated artifact folder:
raw-output.txt contains the exact CLI output.
summary.md contains command metadata and a short preview.
-
Integrate only verified findings into Codex's work. When reporting to the user, distinguish delegated findings from locally verified facts.
Tool Preference
Use -PreferredTool auto by default. The wrapper checks commands in this order:
agy
antigravity
gemini
If agy or antigravity exists but returns no non-interactive output, the wrapper updates %USERPROFILE%\.gemini\antigravity-cli\settings.json to include the workspace in trustedWorkspaces, retries once, then treats continued empty output as an interactive login/session requirement. It starts a visible PowerShell window in the requested workspace running agy, writes auth_required artifacts, and exits. Do not silently fall back to Gemini in this case.
Use a specific tool name only when the user asks for it or the environment requires it:
.\scripts\invoke-google-agent.ps1 -TaskType explorer -PromptFile .\prompt.md -PreferredTool gemini
Prompt Discipline
Delegation prompts must be self-contained and bounded. Include this constraint unless edits are explicitly intended:
Do not modify files. Return findings only.
For implementation-worker style delegation, require a disjoint write set and an explicit changed-files list:
You may edit only these files: <paths>. Do not revert or overwrite unrelated changes.
Return the exact files changed, test commands run, and remaining risks.
References
- Use
references/task-routing.md for routing, safety rules, and task-type defaults.
- Use
references/prompt-templates.md for ready-to-use Turkish and English prompt templates.