[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92574":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},92574,"antigravity-for-claude-code","yuting0624\u002Fantigravity-for-claude-code","yuting0624","Claude Code plugin: run the Antigravity CLI (Gemini) as a collaborating sub-agent with intelligent model routing across the SDLC. Community project; not affiliated with Google\u002FAnthropic.",null,"Shell",142,12,1,4,0,5,43.84,"MIT License",false,"master",true,[],"2026-07-22 04:02:06","\u003Cdiv align=\"center\">\n\n# 🛰️ Antigravity for Claude Code\n\n**Run the Antigravity CLI (Gemini) as a collaborating sub-agent, right inside Claude Code.**\n![Antigravity for Claude Code — Claude directs, Gemini executes](docs\u002Fhero.png)\nClaude conducts the judgement; Gemini does the heavy lifting — intelligent model routing across the SDLC.\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Factions\u002Fworkflows\u002Fci.yml)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green.svg)](LICENSE)\n![Claude Code plugin](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FClaude%20Code-plugin-5A4FCF?logo=claudecode&logoColor=#D97757)\n[![Antigravity CLI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAntigravity%20CLI-agy-4285F4?logo=googlegemini&logoColor=white)](https:\u002F\u002Fantigravity.google\u002Fdocs\u002Fcli-using)\n\n\u003C\u002Fdiv>\n\n---\n\n## ⚡ Quick look\n\n![Antigravity for Claude Code demo](docs\u002Fdemo.gif)\n\nClaude stays the conductor; the bulk, token-heavy read ran on cheaper Gemini, and Claude verified the result.\n\n---\n\n## 💡 Why\n\n| | Claude (conductor) | Gemini \u002F `agy` (executor) |\n|---|---|---|\n| **Owns** | requirements · architecture · the hard 20% · **verification** · review | scaffold · implementation · test generation · search |\n| **Strength** | judgement | cheap, fast throughput |\n\n```\nyou → Claude Code (conduct: design \u002F verify \u002F review)\n         └── agy → Gemini (execute: implement \u002F test \u002F search)\n```\n\n> *Generation is solved; verification, judgement, and direction are the craft.*\n\n## ✨ What it does\n\n- **Routes work across the SDLC** — Claude keeps the judgement calls; Antigravity handles scaffolding, **test generation**, **first-pass review**, and **migrations** under a shared `AGENTS.md`.\n- **Adds tools Claude lacks natively** — live **Google\u002Fweb search**, **Vertex AI Search** over your internal data, deep research, Cloud Logging. Claude reviews and re-checks the results.\n- **Cross-model verification** — an independent, different-model opinion on your code.\n- **Background jobs** — fire a long delegation, keep working, collect later.\n- **Internal fan-out** — one delegation, and agy spawns its own subagents on the cheap side (dynamic `define_subagent` on agy ≥ 1.0.16; `TypeName \"self\"` + Role on any version); each leaves a **readable trajectory** you audit with `agy-trace`.\n- **Built-in cost discipline** — measured, not guessed (see below).\n- **Drops in with the discipline on** — a `SessionStart` hook injects the *cost-aware*\n  routing policy automatically (toggle in plugin settings), and the `antigravity-delegate`\n  subagent does file **writing** on Gemini, so Claude spends **no tokens generating file contents**.\n- **No slash command required** — the delegate subagent is picked up **proactively** for bulk\n  work, and a prompt-level nudge flags bulk-looking requests as delegation candidates.\n  Both are advisory: **the break-even judgment stays with Claude** (full auto-routing is a\n  measured net loss below the break-even), and the nudge is toggleable (`delegation_nudge`).\n\n## 📊 Measured results\n\nOn a **large** ADK multi-agent build (+ `adk eval`), same task \u002F same model, 3 ways:\n\n| | Claude solo @high | solo @max | **hybrid** |\n|---|---|---|---|\n| frontier cost (COST-WEIGHTED) | 2.62M | 5.34M | **1.91M** |\n| quality (`adk eval`) | ✅ 3\u002F3 | ✅ 3\u002F3 | ✅ **3\u002F3** |\n\n→ **−27% vs solo@high, −64% vs solo@max, at equal quality** — and the cheap Gemini work isn't even counted. Savings scale with task size; tiny one-off tasks are cheaper to just run on Claude. Full A\u002FB: [`docs\u002FAB-RESULTS.md`](docs\u002FAB-RESULTS.md).\n\n> **Note on cost figures:** numbers are **estimates** — token counts are approximated and rates live in [`prices.json`](prices.json). **Set your real Vertex rates there before quoting any figure.**\n\n## 🚀 Install\n\nIn Claude Code:\n```\n\u002Fplugin marketplace add yuting0624\u002Fantigravity-for-claude-code\n\u002Fplugin install antigravity@antigravity-for-claude-code\n\u002Fantigravity:setup        # verifies agy is installed + authenticated\n```\n\n**Prerequisites:** the [Antigravity CLI](https:\u002F\u002Fantigravity.google\u002Fdocs\u002Fcli-using) (`agy`) installed & authenticated (`agy models` lists Gemini models), and Claude Code. For the same-bill cost benefit, run Claude Code on Vertex too.\n\n**Platform support:** macOS, Linux, and **WSL** are the supported targets for headless delegation. **Native Windows (Git Bash\u002FMSYS) is not recommended** — `agy -p` can hang with a 0-byte log when run without a real console (ConPTY); see [issue #6](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Fissues\u002F6). The wrapper now bounds this with a wall-clock guard (GNU `timeout`\u002F`gtimeout`, returning a clean TIMEOUT instead of hanging), and `doctor` distinguishes a hang from an auth failure — but for reliable headless use, run from **WSL\u002FmacOS\u002FLinux**.\n\n## 🧩 Slash commands\n\n\u003Cimg src=\"docs\u002Fimage.png\" alt=\"The \u002Fantigravity slash commands in a Claude Code terminal session\" width=\"720\">\n\n*The plugin's commands show up natively in Claude Code's `\u002F` menu.*\n\n| command | what it does |\n|---|---|\n| `\u002Fantigravity:setup` | health check — `agy` installed + authenticated, scripts ready |\n| `\u002Fantigravity:delegate [--tier flash\\|pro] \u003Ctask>` | delegate a subtask to agy under cost discipline, then verify |\n| `\u002Fantigravity:review [--adversarial]` | independent cross-model review of the current diff; Claude reconciles |\n| `\u002Fantigravity:research \u003Ctopic>` | Claude-orchestrated deep research — agy does grounded web legwork, Claude verifies citations across ≥2 sources |\n| `\u002Fantigravity:cloud-run-debug [--service \u003Cs>] [--region \u003Cr>] [--project \u003Cid>] [--since 1h] [--apply]` | diagnose a failing Cloud Run service — agy digests the error logs, Claude infers the root cause + fix; read-only by default (`--apply` writes to a branch) |\n| `\u002Fantigravity:status [id]` · `:result \u003Cid>` · `:cancel \u003Cid>` | manage background delegation jobs |\n\n> Background jobs are for **interactive** sessions (fire-and-collect). In headless `claude -p` (one-shot), delegate **synchronously** — there's no later turn to collect a result.\n\n---\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🛠️ Direct script usage &amp; tiers\u003C\u002Fb>\u003C\u002Fsummary>\n\n```bash\n# one-shot delegation (plain text on stdout)\nscripts\u002Fagy-delegate.sh --tier flash \"Summarize this changelog in 3 bullets: ...\"\n\n# give Antigravity a workspace for multi-file agentic work\nscripts\u002Fagy-delegate.sh --tier pro --dir .\u002Fsrc \"List every TODO with file:line\"\n\n# bulk read -> digest-only reply (the biggest cost lever; wrapper warns on dump-sized replies)\nscripts\u002Fagy-delegate.sh --digest --dir . \"Map the auth flow end to end\"\n\n# write task: auto-apply FILE edits without granting terminal\u002Ftools (agy >= 1.1.0)\nscripts\u002Fagy-delegate.sh --mode accept-edits --dir .\u002Fapp \"Implement X per SPEC.md\"\n\n# live web \u002F Google search (tools need --yolo in headless mode)\nscripts\u002Fagy-delegate.sh --tier pro --yolo \"Web-search \u003CX>. Give URLs + dates.\"\n\n# Vertex AI Search over internal data\nscripts\u002Fagy-delegate.sh --tier pro --yolo \"List Vertex AI Search engines (list_engines).\"\n\n# cross-model review \u002F stdin \u002F background job\nscripts\u002Fagy-delegate.sh --tier pro \"Review for bugs, be skeptical: \u003Cpaste>\"\ncat big-prompt.txt | scripts\u002Fagy-delegate.sh -\nID=$(scripts\u002Fagy-job.sh start --tier pro --dir . \"big task\"); scripts\u002Fagy-job.sh result \"$ID\"\n```\n\n| tier | model | use for |\n|------|-------|---------|\n| `flash` (default) | Gemini 3.5 Flash (High) | most bulk work |\n| `flash-lo` | Gemini 3.5 Flash (Low) | cheapest, trivial tasks |\n| `pro` | Gemini 3.1 Pro (High) | harder reasoning \u002F cross-checks |\n\n**agy is multi-model.** Tiers default to Gemini, but you can use any model `agy models` lists\n(Claude \u002F GPT on plans that expose them): pass `--model \"\u003Cexact name>\"`, or set it persistently\nvia plugin options — `default_model`, or per-tier `tier_flash` \u002F `tier_flash_lo` \u002F `tier_pro`\n(env `CLAUDE_PLUGIN_OPTION_*`). Keep the executor a *different, cheaper* model than the Claude\nconductor — that's what gives both the cost saving and the cross-model verification.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>💸 How to actually get the savings (cost discipline)\u003C\u002Fb>\u003C\u002Fsummary>\n\nDelegation doesn't save money by itself — these do (also in the skill):\n\n1. **Delegate above the break-even** — bulk\u002Fparallel\u002Frepetitive work, not tiny tasks.\n2. **Keep Claude's context lean** — don't re-read what agy already handled; take a **digest**, not raw output. (Biggest lever — it collapses `cache_read`.) Enforced in code: `--digest` appends a digest-only output contract, and the wrapper **warns when a reply comes back dump-sized** (tune via the `digest_warn_chars` plugin option).\n3. **Batch** — one big delegation beats many round-trips.\n4. **Review the diff, not the whole tree.**\n\n`scripts\u002Fmeasure-session.py \u003Csession-id>` prints the COST-WEIGHTED + est. USD breakdown for a session (Claude side; Gemini side priced separately). `scripts\u002Fagy-cost-compare.sh` shows the per-token gap for a task — **estimates from char-count, so verify `prices.json` first.**\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🚧 Guardrails &amp; known limits\u003C\u002Fb>\u003C\u002Fsummary>\n\n> **Something broken?** See **[docs\u002FTROUBLESHOOTING.md](docs\u002FTROUBLESHOOTING.md)** — symptom-first fixes for Windows\u002FWSL, writes that silently don't happen, quota\u002Fauth\u002Ftimeout codes, and updating.\n\n**Guardrails**\n- Always **verify** agy's output (it can be wrong, and may even alter its environment to make a check pass — re-run gates yourself in a clean state).\n- `--yolo` auto-approves every tool call — use with `--sandbox` or in a throwaway dir.\n- Write tasks: run on a dedicated branch\u002Fworktree, review the diff before merging.\n\n**Known limits (agy v1.0.x)**\n- `-p`\u002F`--print` **takes the prompt as its value** and must come last — the wrapper handles this.\n- No `--output-format json` (plain text); `--print` drops stdout on a non-TTY unless stdin is detached (handled via `\u003C \u002Fdev\u002Fnull`).\n- **Writes need write permission:** without it, headless agy describes the edits or (agy ≥ 1.1.0, review-first default) writes them to its **own scratch dir** — your workspace stays untouched while agy reports success ([issue #10](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Fissues\u002F10)). Prefer **`--mode accept-edits`** (agy ≥ 1.1.0; file edits only, no terminal\u002Ftool grant); use `--yolo` when the task also needs tools (web \u002F Vertex AI Search). Run write tasks on a branch and verify files actually changed. Long write tasks can exceed the ~2-min sync Bash limit → use a background job.\n- **Native Windows (no ConPTY):** headless `agy -p` \u002F `agy models` can hard-hang with a 0-byte log when stdio is redirected ([issue #6](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Fissues\u002F6)). The wrapper wraps agy in a wall-clock `timeout`\u002F`gtimeout` guard so it returns a structured TIMEOUT (exit 12) instead of hanging; `doctor` reports the likely hang instead of a misleading \"not authenticated\". Without `timeout` on PATH there's no safety net — use **WSL\u002FmacOS\u002FLinux** for headless delegation.\n- **WSL:** running agy with `--add-dir` on a Windows mount (`\u002Fmnt\u002Fc\u002F...`) is very slow — agy reads the workspace over a 9p bridge, so even trivial calls can take 20s+. Keep the repo on the WSL Linux filesystem (`~`). The wrapper and `doctor` warn about this.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>📦 What's inside · local dev · tests\u003C\u002Fb>\u003C\u002Fsummary>\n\n```\n.claude-plugin\u002F   plugin (+ userConfig: default_tier, timeout, coding_policy) + marketplace manifests\nskills\u002Fantigravity\u002FSKILL.md   WHEN + HOW Claude collaborates with agy\nagents\u002F           antigravity-delegate subagent (file work runs on Gemini, not Claude)\ncommands\u002F         slash commands (delegate, review, research, cloud-run-debug, setup, status, result, cancel)\nhooks\u002F            SessionStart: agy health check + auto-inject the cost-aware policy\nscripts\u002F          agy-delegate · agy-job · agy-cost-compare · cloud-debug · agy-trace · measure-session · doctor\ndocs\u002F             AB-RESULTS (measured A\u002FB) · TROUBLESHOOTING · DEMO-KIT\nprices.json       Vertex rate config (verify before quoting)\n```\n\n**Local development** (hack on the plugin — loads live files, `$CLAUDE_PLUGIN_ROOT` resolves):\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code ~\u002Fantigravity-for-claude-code\nclaude --plugin-dir ~\u002Fantigravity-for-claude-code\n```\n\n**Tests** (no dependencies; stubs `agy`):\n```bash\nbash tests\u002Frun-tests.sh\n```\n\n\u003C\u002Fdetails>\n\n---\n\n## 🤝 Contributing\n\nEarly-stage and MIT — issues, PRs, and ⭐ all welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) and the [`good first issue`](https:\u002F\u002Fgithub.com\u002Fyuting0624\u002Fantigravity-for-claude-code\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) list.\n\n---\n\n## ⚠️ Disclaimer\n\nCommunity project. **Not affiliated with, endorsed by, or supported by Google or Anthropic.** \"Antigravity\", \"Gemini\", \"Claude\", and \"Claude Code\" are trademarks of their respective owners. This plugin orchestrates the third-party `agy` CLI; you are responsible for your own API\u002Fcloud costs, credentials, and data-sharing choices. MIT licensed — see [LICENSE](LICENSE).\n","这是一个为 Claude Code 设计的插件，实现 Claude 与 Gemini（通过 Antigravity CLI）的协同工作模式：Claude 作为主控模型负责需求理解、架构设计、结果验证与代码审查，Gemini 作为执行子代理承担高吞吐、低开销任务，如代码生成、测试编写、迁移脚本开发、Web\u002F内部数据搜索及背景式长时任务。项目基于 Shell 实现，支持智能跨模型路由、可审计的执行轨迹（agy-trace）、成本感知调度与免命令触发的主动委托机制，适用于需兼顾代码质量保障与开发效率的中大型软件工程场景。",2,"2026-07-09 02:30:23","CREATED_QUERY"]