$npx -y skills add Dianel555/DSkills --skill cc-agyDelegates coding/research tasks to the Google Antigravity CLI (agy) for external-model execution (Gemini 3.x, Claude Sonnet/Opus 4.6, GPT-OSS). Replaces the broken collaborating-with-gemini skill. Use when: (1) External-model delegation via Antigravity, (2) Multi-model protot
| 1 | ## Quick Start |
| 2 | |
| 3 | ```bash |
| 4 | python scripts/agy_bridge.py --cd "/path/to/project" --PROMPT "Your task" |
| 5 | ``` |
| 6 | |
| 7 | **Output:** JSON with `success`, `SESSION_ID`, `agent_messages`, and optional `error` / `stderr`. |
| 8 | |
| 9 | ## Parameters |
| 10 | |
| 11 | ``` |
| 12 | usage: agy_bridge.py [-h] --PROMPT PROMPT --cd CD |
| 13 | [--model MODEL] [--SESSION_ID SESSION_ID] |
| 14 | [--sandbox] [--no-skip-permissions] |
| 15 | [--print-timeout PRINT_TIMEOUT] |
| 16 | [--return-all-messages] |
| 17 | {check,plugin} ... |
| 18 | |
| 19 | Antigravity (agy) Bridge |
| 20 | |
| 21 | options: |
| 22 | -h, --help show this help message and exit |
| 23 | --PROMPT PROMPT Instruction for the task to send to agy. |
| 24 | --cd CD Workspace root for agy (sets cwd + --add-dir). |
| 25 | --model MODEL Model alias (flash-low/medium/high, pro-low/high, sonnet, |
| 26 | opus, gpt-oss) or canonical string. Omit to use the |
| 27 | settings.json default. |
| 28 | --SESSION_ID SESSION_ID |
| 29 | Resume a conversation by UUID. Maps to agy --conversation. |
| 30 | --sandbox Run in agy sandbox mode. |
| 31 | --no-skip-permissions |
| 32 | Do NOT pass --dangerously-skip-permissions. WARNING: |
| 33 | with default toolPermission=request-review, print mode |
| 34 | WILL HANG. Only for interactive review workflows. |
| 35 | --print-timeout PRINT_TIMEOUT |
| 36 | agy --print-timeout (e.g. 5m, 10m). Default 10m. |
| 37 | --return-all-messages |
| 38 | Include reasoning + all type=15 steps in the response. |
| 39 | |
| 40 | subcommands: |
| 41 | check Probe agy install / version / auth / current model. |
| 42 | plugin Thin passthrough to `agy plugin list|import|install|enable|disable`. |
| 43 | ``` |
| 44 | |
| 45 | ## Multi-turn Sessions |
| 46 | |
| 47 | **Always capture `SESSION_ID`** from the first response for follow-up (maps to agy `--conversation <UUID>`, which appends to the same conversation DB): |
| 48 | |
| 49 | ```bash |
| 50 | # Initial task |
| 51 | python scripts/agy_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py" |
| 52 | |
| 53 | # Continue with SESSION_ID |
| 54 | python scripts/agy_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that" |
| 55 | ``` |
| 56 | |
| 57 | ## Common Patterns |
| 58 | |
| 59 | **Prototyping (request diffs):** |
| 60 | ```bash |
| 61 | python scripts/agy_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging" --model pro |
| 62 | ``` |
| 63 | |
| 64 | **Switch model per call:** |
| 65 | ```bash |
| 66 | python scripts/agy_bridge.py --cd "/project" --PROMPT "Review this Rust" --model sonnet |
| 67 | python scripts/agy_bridge.py --cd "/project" --PROMPT "Same code" --model opus |
| 68 | ``` |
| 69 | |
| 70 | **Setup check:** |
| 71 | ```bash |
| 72 | python scripts/agy_bridge.py check |
| 73 | ``` |
| 74 | |
| 75 | **Manage skills/plugins (passthrough to agy):** |
| 76 | ```bash |
| 77 | python scripts/agy_bridge.py plugin list |
| 78 | python scripts/agy_bridge.py plugin import /path/to/plugin |
| 79 | ``` |
| 80 | |
| 81 | ## How It Works |
| 82 | |
| 83 | `agy --print` writes nothing to stdout. The bridge instead runs agy, discovers the new conversation SQLite DB at `~/.gemini/antigravity-cli/conversations/<UUID>.db`, and extracts the assistant reply from the last `step_type=15` row's `step_payload` protobuf (field `f20` → `f1`). MCP servers (`~/.gemini/antigravity/mcp_config.json`), the memory doc (`~/.gemini/GEMINI.md`), and skills are pre-configured by the user and auto-loaded by agy — the bridge does not manage them. |
| 84 | |
| 85 | ## Security Note |
| 86 | |
| 87 | By default the bridge passes `--dangerously-skip-permissions` to agy. This is **mandatory for non-interactive `--print` mode** because agy's default `toolPermission` is `request-review`, which blocks waiting for a human to approve tool calls — and since `--print` captures no TTY, the process hangs until timeout. With `--dangerously-skip-permissions`, agy auto-approves all tool calls. Only pass `--no-skip-permissions` if agy can service interactive permission prompts. The bridge always runs under a hard outer timeout (`--print-timeout` + 60s) so a hung agy cannot block indefinitely. |
| 88 | |
| 89 | ## Known Limitations |
| 90 | |
| 91 | - **Protobuf extraction is schema-dependent.** The bridge parses agy's conversation DB without a `.proto` file, reading the reply from field `f1` inside field `f20` of the last `step_type=15` row. If agy changes its internal schema, extraction returns empty. Fix location: `extract_answer()` in `scripts/agy_bridge.py`. |
| 92 | - `agy models` returns empty o |