Claude Skill

cc-agy

Delegates 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

LLM Mart · 0 points · 4 views 0 listing impressions 0 install-command copies
Download Dianel555-DSkills-skills_cc-agy-d2fda23.zip · 15 KB

Install

skills CLI npx skills add https://github.com/Dianel555/DSkills/tree/main/skills/cc-agy
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dianel555-dskills@llmmart
Git git clone https://github.com/Dianel555/DSkills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dianel555/dskills collection as a plugin from our marketplace. Git is the plain clone.

README

cc-agy

A Claude Code Agent Skill that bridges Claude with the Google Antigravity CLI (agy) for external-model delegation(Gemini CLI stopped working for person).

Overview

This Skill lets Claude delegate coding/research tasks to agy, which runs external models — Gemini 3.x, Claude Sonnet/Opus 4.6, GPT-OSS — with their own configured MCP servers, skills, and memory doc. Claude orchestrates the workflow and refines the output; agy executes on the external model.

agy --print writes nothing to stdout, so the bridge instead discovers the conversation SQLite DB that agy persists and extracts the assistant reply from its protobuf payload. When a run fails upstream, agy records the executor error in a separate step_type=17 row instead of any reply text; the bridge reads that row and reports the real cause. MCP (~/.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.

Features

  • Multi-turn sessions: Resume conversations via SESSION_ID (maps to agy --conversation)
  • Multi-model prototyping: Switch model per call with --model aliases (flash, pro, sonnet, opus, gpt-oss)
  • JSON output: Structured responses isomorphic to gemini_bridge.py
  • Cross-platform: Windows path / UTF-8 handled automatically
  • Setup probe: check subcommand reports agy install / version / auth / current model
  • Plugin passthrough: plugin subcommand forwards to agy plugin list|import|install|enable|disable

Prerequisites

  1. Install the Antigravity CLI:
    curl -fsSL https://antigravity.google/cli/install.sh | bash
    
  2. Authenticate: run agy once interactively (browser OAuth), or export ANTIGRAVITY_API_KEY.
  3. Pick a default model: open agy and use /model, which writes ~/.gemini/antigravity-cli/settings.json.

Verify with:

python scripts/agy_bridge.py check

Installation

Copy this Skill to your Claude Code skills directory:

  • User-level: ~/.claude/skills/cc-agy/
  • Project-level: .claude/skills/cc-agy/

Or, in the DSkills marketplace, it is registered in .claude-plugin/marketplace.json as the cc-agy plugin.

Usage

Basic

python scripts/agy_bridge.py --cd "/path/to/project" --PROMPT "Analyze the authentication flow"

Multi-turn Session

# Start a session
python scripts/agy_bridge.py --cd "/project" --PROMPT "Review login.py for security issues"
# Response includes SESSION_ID

# Continue the session
python scripts/agy_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Suggest fixes for the issues found"

Switch Model Per Call

python scripts/agy_bridge.py --cd "/project" --PROMPT "Review this Rust" --model sonnet
python scripts/agy_bridge.py --cd "/project" --PROMPT "Same code" --model opus

Parameters

Parameter Required Description
--PROMPT Yes Task instruction
--cd Yes Workspace root (agy cwd + --add-dir)
--model No Model alias or canonical string; omit for settings default
--SESSION_ID No Resume a conversation by UUID (maps to --conversation)
--sandbox No Run in agy sandbox mode
--no-skip-permissions No Do NOT pass --dangerously-skip-permissions (WARNING: hangs print mode)
--print-timeout No agy --print-timeout (e.g. 5m, 10m); default 10m
--return-all-messages No Include reasoning + all type=15 steps

Model aliases: flash-low/medium/high, pro-low/high, sonnet, opus, gpt-oss.

Subcommands

Subcommand Description
check Probe agy install / version / auth / current model
plugin Thin passthrough to agy plugin list\|import\|install\|enable\|disable

Output Format

{
  "success": true,
  "SESSION_ID": "uuid",
  "agent_messages": "agy response text"
}

When agy produces no reply, error carries agy's own upstream failure rather than a guess about the bridge:

{
  "success": false,
  "SESSION_ID": "uuid",
  "error": "agy produced no reply because the run failed upstream (rc=1): FAILED_PRECONDITION (code 400): User location is not supported for the API use.",
  "steps_file": "/tmp/agy_steps_xxxx.jsonl"
}

Upstream failures are often transient (geo/egress-IP rejection, model capacity exhausted). The bridge does not retry — the status detail tells the caller whether to wait or switch --model.

Security Note

By default the bridge passes --dangerously-skip-permissions to agy. This is mandatory for non-interactive --print mode: agy's default toolPermission is request-review, which blocks waiting for a human to approve tool calls, and --print captures no TTY — so the process hangs until timeout. With --dangerously-skip-permissions, agy auto-approves all tool calls. The bridge always runs under a hard outer timeout (--print-timeout + 60s) so a hung agy cannot block indefinitely. Only use --no-skip-permissions in a context where interactive permission prompts can be serviced.

Known Limitations

  • Protobuf extraction is schema-dependent. The reply is read from field f1 inside field f20 of step_type=15 rows; upstream errors from f24 → f3 of step_type=17 rows. If agy changes its internal schema, extraction returns empty. Fix location: extract_answer() (replies) or extract_run_error() (errors) in scripts/agy_bridge.py. The reported error names which one to fix, so trust it over guessing.
  • agy models returns empty on this build; model aliases are hardcoded.
  • --continue is intentionally not exposed (target selection is opaque); use --SESSION_ID to resume a specific conversation.

License

MIT License. See LICENSE for details.

Skill manifest

Quick Start

python scripts/agy_bridge.py --cd "/path/to/project" --PROMPT "Your task"

Output: JSON with success, SESSION_ID, agent_messages, steps_file, and optional error / note / stderr. On failure, error names the upstream cause agy recorded (e.g. a 400/503 status) when one exists.

Parameters

usage: agy_bridge.py [-h] --PROMPT PROMPT --cd CD
                     [--model MODEL] [--SESSION_ID SESSION_ID]
                     [--sandbox] [--no-skip-permissions]
                     [--print-timeout PRINT_TIMEOUT]
                     [--return-all-messages]
                     {check,plugin} ...

Antigravity (agy) Bridge

options:
  -h, --help            show this help message and exit
  --PROMPT PROMPT       Instruction for the task to send to agy.
  --cd CD               Workspace root for agy (sets cwd + --add-dir).
  --model MODEL         Model alias (flash-low/medium/high, pro-low/high, sonnet,
                        opus, gpt-oss) or canonical string. Omit to use the
                        settings.json default.
  --SESSION_ID SESSION_ID
                        Resume a conversation by UUID. Maps to agy --conversation.
  --sandbox             Run in agy sandbox mode.
  --no-skip-permissions
                        Do NOT pass --dangerously-skip-permissions. WARNING:
                        with default toolPermission=request-review, print mode
                        WILL HANG. Only for interactive review workflows.
  --print-timeout PRINT_TIMEOUT
                        agy --print-timeout (e.g. 5m, 10m). Default 10m.
  --return-all-messages
                        Include reasoning + all type=15 steps in the response.

subcommands:
  check                 Probe agy install / version / auth / current model.
  plugin                Thin passthrough to `agy plugin list|import|install|enable|disable`.

Multi-turn Sessions

Always capture SESSION_ID from the first response for follow-up (maps to agy --conversation <UUID>, which appends to the same conversation DB):

# Initial task
python scripts/agy_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py"

# Continue with SESSION_ID
python scripts/agy_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that"

Common Patterns

Prototyping (request diffs):

python scripts/agy_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging" --model pro

Switch model per call:

python scripts/agy_bridge.py --cd "/project" --PROMPT "Review this Rust" --model sonnet
python scripts/agy_bridge.py --cd "/project" --PROMPT "Same code" --model opus

Setup check:

python scripts/agy_bridge.py check

Manage skills/plugins (passthrough to agy):

python scripts/agy_bridge.py plugin list
python scripts/agy_bridge.py plugin import /path/to/plugin

How It Works

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 step_type=15 rows' 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.

When a run fails upstream, agy writes no reply text at all and instead records the executor error in a step_type=17 row (f24 → f3: f1 user-facing line, f2 status detail). The bridge reads that row and reports the real cause — e.g. FAILED_PRECONDITION (code 400): User location is not supported for the API use. or UNAVAILABLE (code 503): No capacity available for model ... — instead of blaming its own parsing. stderr alone carries only agy's generic Agent execution terminated due to error. and no status code.

On resume, both extractors window on idx > after_idx, where the boundary spans all step types: a failed run's type=17 row lands after its last type=15 step, so a type=15-only boundary would re-attribute that stale error to the next run.

The bridge does not retry. A 400 geo rejection will almost certainly fail again on an immediate retry, and 503 capacity exhaustion is better answered by switching --model than by replaying — which could also repeat tool side effects. The structured error is passed through so the caller decides.

Security Note

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.

Known Limitations

  • Protobuf extraction is schema-dependent. The bridge parses agy's conversation DB without a .proto file: replies from f20 → f1 of step_type=15 rows, upstream errors from f24 → f3 of step_type=17 rows. If agy changes its internal schema, extraction returns empty. The reported error distinguishes the two cases — a message naming an upstream status means agy failed and the bridge worked; the schema-drift hint appears only when no error row explains the empty reply. Fix locations: extract_answer() and extract_run_error() in scripts/agy_bridge.py.
  • agy models returns empty on this build; model aliases are hardcoded.
  • --continue is intentionally NOT exposed (target selection is opaque); use --SESSION_ID to resume a specific conversation.
Files (dskills)
  • scripts
    • agy_bridge.py 18.8 KB
      Loading…
  • tests
    • test_agy_bridge.py 8.6 KB
      Loading…
  • README.md 5.8 KB
    # cc-agy
    
    A Claude Code **Agent Skill** that bridges Claude with the Google Antigravity CLI (`agy`) for external-model delegation(Gemini CLI stopped working for person).
    
    ## Overview
    
    This Skill lets Claude delegate coding/research tasks to `agy`, which runs external models — Gemini 3.x, Claude Sonnet/Opus 4.6, GPT-OSS — with their own configured MCP servers, skills, and memory doc. Claude orchestrates the workflow and refines the output; agy executes on the external model.
    
    `agy --print` writes nothing to stdout, so the bridge instead discovers the conversation SQLite DB that agy persists and extracts the assistant reply from its protobuf payload. When a run fails upstream, agy records the executor error in a separate `step_type=17` row instead of any reply text; the bridge reads that row and reports the real cause. MCP (`~/.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.
    
    ## Features
    
    - **Multi-turn sessions**: Resume conversations via `SESSION_ID` (maps to agy `--conversation`)
    - **Multi-model prototyping**: Switch model per call with `--model` aliases (flash, pro, sonnet, opus, gpt-oss)
    - **JSON output**: Structured responses isomorphic to `gemini_bridge.py`
    - **Cross-platform**: Windows path / UTF-8 handled automatically
    - **Setup probe**: `check` subcommand reports agy install / version / auth / current model
    - **Plugin passthrough**: `plugin` subcommand forwards to `agy plugin list|import|install|enable|disable`
    
    ## Prerequisites
    
    1. Install the Antigravity CLI:
       ```bash
       curl -fsSL https://antigravity.google/cli/install.sh | bash
       ```
    2. Authenticate: run `agy` once interactively (browser OAuth), or export `ANTIGRAVITY_API_KEY`.
    3. Pick a default model: open `agy` and use `/model`, which writes `~/.gemini/antigravity-cli/settings.json`.
    
    Verify with:
    ```bash
    python scripts/agy_bridge.py check
    ```
    
    ## Installation
    
    Copy this Skill to your Claude Code skills directory:
    - User-level: `~/.claude/skills/cc-agy/`
    - Project-level: `.claude/skills/cc-agy/`
    
    Or, in the DSkills marketplace, it is registered in `.claude-plugin/marketplace.json` as the `cc-agy` plugin.
    
    ## Usage
    
    ### Basic
    
    ```bash
    python scripts/agy_bridge.py --cd "/path/to/project" --PROMPT "Analyze the authentication flow"
    ```
    
    ### Multi-turn Session
    
    ```bash
    # Start a session
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Review login.py for security issues"
    # Response includes SESSION_ID
    
    # Continue the session
    python scripts/agy_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Suggest fixes for the issues found"
    ```
    
    ### Switch Model Per Call
    
    ```bash
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Review this Rust" --model sonnet
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Same code" --model opus
    ```
    
    ### Parameters
    
    | Parameter | Required | Description |
    |-----------|----------|-------------|
    | `--PROMPT` | Yes | Task instruction |
    | `--cd` | Yes | Workspace root (agy cwd + `--add-dir`) |
    | `--model` | No | Model alias or canonical string; omit for settings default |
    | `--SESSION_ID` | No | Resume a conversation by UUID (maps to `--conversation`) |
    | `--sandbox` | No | Run in agy sandbox mode |
    | `--no-skip-permissions` | No | Do NOT pass `--dangerously-skip-permissions` (WARNING: hangs print mode) |
    | `--print-timeout` | No | agy `--print-timeout` (e.g. `5m`, `10m`); default `10m` |
    | `--return-all-messages` | No | Include reasoning + all `type=15` steps |
    
    Model aliases: `flash-low/medium/high`, `pro-low/high`, `sonnet`, `opus`, `gpt-oss`.
    
    ### Subcommands
    
    | Subcommand | Description |
    |------------|-------------|
    | `check` | Probe agy install / version / auth / current model |
    | `plugin` | Thin passthrough to `agy plugin list\|import\|install\|enable\|disable` |
    
    ### Output Format
    
    ```json
    {
      "success": true,
      "SESSION_ID": "uuid",
      "agent_messages": "agy response text"
    }
    ```
    
    When agy produces no reply, `error` carries agy's own upstream failure rather than a guess about the bridge:
    
    ```json
    {
      "success": false,
      "SESSION_ID": "uuid",
      "error": "agy produced no reply because the run failed upstream (rc=1): FAILED_PRECONDITION (code 400): User location is not supported for the API use.",
      "steps_file": "/tmp/agy_steps_xxxx.jsonl"
    }
    ```
    
    Upstream failures are often transient (geo/egress-IP rejection, model capacity exhausted). The bridge does not retry — the status detail tells the caller whether to wait or switch `--model`.
    
    ## Security Note
    
    By default the bridge passes `--dangerously-skip-permissions` to agy. This is **mandatory for non-interactive `--print` mode**: agy's default `toolPermission` is `request-review`, which blocks waiting for a human to approve tool calls, and `--print` captures no TTY — so the process hangs until timeout. With `--dangerously-skip-permissions`, agy auto-approves all tool calls. The bridge always runs under a hard outer timeout (`--print-timeout` + 60s) so a hung agy cannot block indefinitely. Only use `--no-skip-permissions` in a context where interactive permission prompts can be serviced.
    
    ## Known Limitations
    
    - **Protobuf extraction is schema-dependent.** The reply is read from field `f1` inside field `f20` of `step_type=15` rows; upstream errors from `f24` → `f3` of `step_type=17` rows. If agy changes its internal schema, extraction returns empty. Fix location: `extract_answer()` (replies) or `extract_run_error()` (errors) in `scripts/agy_bridge.py`. The reported error names which one to fix, so trust it over guessing.
    - `agy models` returns empty on this build; model aliases are hardcoded.
    - `--continue` is intentionally not exposed (target selection is opaque); use `--SESSION_ID` to resume a specific conversation.
    
    ## License
    
    MIT License. See [LICENSE](LICENSE) for details.
    
  • ruff.toml 656 B
    Loading…
  • SKILL.md 6.5 KB
    ---
    name: cc-agy
    description: |
      Delegates 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 prototyping (switch model per call), (3) Backend/logic implementation, (4) Algorithm design and optimization, (5) Bug analysis and debugging, (6) API/database code generation, (7) Code review. Triggers: "delegate to agy", "use Antigravity", "external model", "agy", "Gemini 3.5", "Claude Sonnet 4.6", "GPT-OSS". IMPORTANT: Always request unified diff patches only. Supports multi-turn sessions via SESSION_ID.
    ---
    
    ## Quick Start
    
    ```bash
    python scripts/agy_bridge.py --cd "/path/to/project" --PROMPT "Your task"
    ```
    
    **Output:** JSON with `success`, `SESSION_ID`, `agent_messages`, `steps_file`, and optional `error` / `note` / `stderr`. On failure, `error` names the upstream cause agy recorded (e.g. a 400/503 status) when one exists.
    
    ## Parameters
    
    ```
    usage: agy_bridge.py [-h] --PROMPT PROMPT --cd CD
                         [--model MODEL] [--SESSION_ID SESSION_ID]
                         [--sandbox] [--no-skip-permissions]
                         [--print-timeout PRINT_TIMEOUT]
                         [--return-all-messages]
                         {check,plugin} ...
    
    Antigravity (agy) Bridge
    
    options:
      -h, --help            show this help message and exit
      --PROMPT PROMPT       Instruction for the task to send to agy.
      --cd CD               Workspace root for agy (sets cwd + --add-dir).
      --model MODEL         Model alias (flash-low/medium/high, pro-low/high, sonnet,
                            opus, gpt-oss) or canonical string. Omit to use the
                            settings.json default.
      --SESSION_ID SESSION_ID
                            Resume a conversation by UUID. Maps to agy --conversation.
      --sandbox             Run in agy sandbox mode.
      --no-skip-permissions
                            Do NOT pass --dangerously-skip-permissions. WARNING:
                            with default toolPermission=request-review, print mode
                            WILL HANG. Only for interactive review workflows.
      --print-timeout PRINT_TIMEOUT
                            agy --print-timeout (e.g. 5m, 10m). Default 10m.
      --return-all-messages
                            Include reasoning + all type=15 steps in the response.
    
    subcommands:
      check                 Probe agy install / version / auth / current model.
      plugin                Thin passthrough to `agy plugin list|import|install|enable|disable`.
    ```
    
    ## Multi-turn Sessions
    
    **Always capture `SESSION_ID`** from the first response for follow-up (maps to agy `--conversation <UUID>`, which appends to the same conversation DB):
    
    ```bash
    # Initial task
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py"
    
    # Continue with SESSION_ID
    python scripts/agy_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that"
    ```
    
    ## Common Patterns
    
    **Prototyping (request diffs):**
    ```bash
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging" --model pro
    ```
    
    **Switch model per call:**
    ```bash
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Review this Rust" --model sonnet
    python scripts/agy_bridge.py --cd "/project" --PROMPT "Same code" --model opus
    ```
    
    **Setup check:**
    ```bash
    python scripts/agy_bridge.py check
    ```
    
    **Manage skills/plugins (passthrough to agy):**
    ```bash
    python scripts/agy_bridge.py plugin list
    python scripts/agy_bridge.py plugin import /path/to/plugin
    ```
    
    ## How It Works
    
    `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 `step_type=15` rows' `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.
    
    When a run fails upstream, agy writes no reply text at all and instead records the executor error in a `step_type=17` row (`f24` → `f3`: `f1` user-facing line, `f2` status detail). The bridge reads that row and reports the real cause — e.g. `FAILED_PRECONDITION (code 400): User location is not supported for the API use.` or `UNAVAILABLE (code 503): No capacity available for model ...` — instead of blaming its own parsing. `stderr` alone carries only agy's generic `Agent execution terminated due to error.` and no status code.
    
    On resume, both extractors window on `idx > after_idx`, where the boundary spans **all** step types: a failed run's `type=17` row lands after its last `type=15` step, so a `type=15`-only boundary would re-attribute that stale error to the next run.
    
    The bridge does not retry. A 400 geo rejection will almost certainly fail again on an immediate retry, and 503 capacity exhaustion is better answered by switching `--model` than by replaying — which could also repeat tool side effects. The structured error is passed through so the caller decides.
    
    ## Security Note
    
    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.
    
    ## Known Limitations
    
    - **Protobuf extraction is schema-dependent.** The bridge parses agy's conversation DB without a `.proto` file: replies from `f20` → `f1` of `step_type=15` rows, upstream errors from `f24` → `f3` of `step_type=17` rows. If agy changes its internal schema, extraction returns empty. The reported error distinguishes the two cases — a message naming an upstream status means agy failed and the bridge worked; the schema-drift hint appears only when no error row explains the empty reply. Fix locations: `extract_answer()` and `extract_run_error()` in `scripts/agy_bridge.py`.
    - `agy models` returns empty on this build; model aliases are hardcoded.
    - `--continue` is intentionally NOT exposed (target selection is opaque); use `--SESSION_ID` to resume a specific conversation.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.