antigravity-delegate
Skill0 starsChanged 6 months agoMITView on GitHub
Offload work to the local Antigravity CLI (agy) — search, downloads, scanning, validation, AND first-draft code/UI generation — so Claude stays the orchestrator and burns far fewer tokens. agy runs on the user's Google/Antigravity quota, so anything it produces is tokens Claude didn't spend. Invoke /antigravity-delegate "<task>" or apply automatically. Returns only agy's distilled answer.
- Pipes a download into a shell
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/antigravity-delegate.mdcCursor rule
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Keep it when the value is a *final decision*.
- Very specific: line 80
Default to Gemini 3.5 Flash (Low) — escalate only when the worker itself must reason or the draft quality must be high.
- Very specific: line 123
Cheapest-capable model: Use Gemini 3.5 Flash (Low) for legwork.
- Distinctive: line 150
Never silently swallow a failure — surface it, then decide retry vs.
- Distinctive: line 156
Never delegate the final judgment: architecture decisions, security review, or shipping code without Claude reviewing the draft first.
- Distinctive: line 158
Never pipe agy's raw intermediate output (search dumps, file bytes, whole generated files) back into Claude's context unreviewed — defeats …
- Very specific: line 160
Never use write / --dangerously-skip-permissions for destructive or irreversible actions, or outside a scoped dir.
- Distinctive: line 162
Never trust a delegated result blindly for anything that matters — verify the answer, review the draft.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Antigravity Delegate
Claude = orchestrator. Antigravity CLI (agy) = the worker.
agy runs on the user's Google One / Antigravity quota — separate from Claude's token
budget. So every unit of work pushed to agy is tokens Claude never spends. Delegate the
doing (legwork and first drafts); keep the judgment (decisions, security, final review).
Pull back only the small distilled result, never the raw intermediate bytes.
agyreplaces the Gemini CLI (sunsets for Google One / AI Pro / Ultra on 2026-06-18). It exposes Gemini 3.x, Claude, and open-weight models, has web search + file edit + shell + async subagents, and authenticates via the system keyring. Seereferences/agy-cli.md.
When to Apply
Two delegation buckets:
A. Legwork — high-volume, low-judgment; you only need the conclusion. B. Drafting — a capable worker can produce a first version that Claude then reviews/integrates.
| Task | Delegate? | Bucket / note |
| web search → answer | ✅ | A — search noise stays in agy |
| download files / datasets | ✅ | A — bytes never touch Claude context |
| grep huge logs/codebases → the hit | ✅ | A |
| run benchmark / validator → PASS/FAIL | ✅ | A — tool spam stays out |
| summarize a giant file | ✅ | A |
| frontend/UI scaffold, component draft | ✅ | B — Gemini Flash is strong here; Claude reviews |
| boilerplate, config, codemod, repetitive edits | ✅ | B — draft in agy, Claude verifies |
| generate unit tests for existing code | ✅ | B — Claude checks they're meaningful |
| architecture / trade-off decision | ❌ | judgment — keep in Claude |
| security-sensitive code or review | ❌ | keep in Claude |
| shipping code with NO review | ❌ | always review a draft before it ships |
| tiny task (a few lines) | ❌ | delegation overhead not worth it |
Rule of thumb: delegate when the cost is volume or the value is a reviewable draft.
Keep it when the value is a final decision. A draft from agy is an input to Claude's
judgment, never a substitute for it.
Load references/agy-cli.md before constructing any non-trivial agy invocation.
Model Selection
Match the model to the subtask (run agy models for the live list; quote the exact name,
parens included). (Low|Medium|High) sets reasoning effort — lower = cheaper/faster.
| Subtask | Model | Why |
| search / download / scan / validate / summarize | Gemini 3.5 Flash (Low) | cheapest, fastest, best agentic/tool-use |
| frontend/UI drafts, code-gen throughput, multimodal | Gemini 3.5 Flash (High) | strong at UI + grounded tasks; more effort |
| deep reasoning, ultra-long-context, hard analysis | Gemini 3.1 Pro (High) | reasoning + long-context recall |
| correctness-sensitive code draft, test gen | Claude Sonnet 4.6 (Thinking) | coding precision, careful edits |
| hardest reasoning / knowledge | Claude Opus 4.6 (Thinking) | top reasoning (most expensive of the set) |
| cheap open-weight fallback | GPT-OSS 120B (Medium) | when a flagship isn't needed |
Default to Gemini 3.5 Flash (Low) — escalate only when the worker itself must reason or
the draft quality must be high. Cheaper models first; spend effort only where it pays.
Process
- Frame a closed task with a crisp, bounded deliverable. Tell
agyexactly what to output (e.g. "output ONLY the version string", or "write the component to src/Foo.tsx and reply with only the file path"). For drafting tasks, state the constraints Claude cares about (framework, style, file location) up front. - Pick the mode (controls tool auto-approval):
search— web/research. Read-only tools (web search) work unattended.read— scan local files/logs. Read-only tools (file read) work unattended.write— downloads, builds, validators, or writing code/files (--dangerously-skip-permissions, scoped to--dir). For expected, reversible actions.--out FILEauto-selects write mode.
- Pick the model from the matrix above.
- Run via the helper:
Prints agy's plain-text answer to stdout (plain text, not JSON — no extraction step).scripts/agy-run.sh "<task>" --mode search --model "Gemini 3.5 Flash (Low)" - Pull back only the distilled result. For large artifacts (generated code, downloaded
data), have agy write to disk (
--out FILE/ a target path) and only read the slice Claude needs. Never paste raw search dumps, file bytes, or whole generated files into context blindly. - Review and decide in Claude. For legwork: sanity-check the answer. For drafts: review the produced code/file, fix what matters, integrate. The judgment is Claude's; only the doing was delegated.
Token-Saving Patterns
- Draft → review. Let
agyproduce the first version of a component / boilerplate / test file (on its quota); Claude reviews the diff, not a blank page. Big win on frontend scaffolds. - File-out, read-the-slice.
--out FILEkeeps bulky output (data, long code) on disk; Claude reads only what it must reason about. - Cheapest-capable model. Use
Gemini 3.5 Flash (Low)for legwork; reserve Pro/Thinking models for genuinely hard subtasks. - Batch closed tasks. One well-scoped
agycall beats several chatty ones.
Output
- Default: the helper prints agy's plain-text answer to stdout — what enters Claude's context.
--out FILE: agy's work lands on disk; the reply is a one-line summary; Claude reads the needed slice.
Error Handling
| Exit code | Meaning | Action |
0 | success | use the answer |
1 | general / runtime failure (or empty response) | check stderr; retry once, then fall back to doing it in Claude |
2 | input error (bad prompt/args/mode) | fix the prompt/flags and rerun |
| other | passed through from agy | inspect stderr |
- Empty response on a tool-needing task → re-run with
--mode write(auto-approves tools). agynot installed → stop delegating, do it in Claude, tell the user to install:curl -fsSL https://antigravity.google/cli/install.sh | bash.- Long task hitting
--print-timeout(default 5m) → raise--timeoutor split the task. - Never silently swallow a failure — surface it, then decide retry vs. do-it-here.
Never Do
- Never delegate the final judgment: architecture decisions, security review, or shipping code without Claude reviewing the draft first.
- Never pipe agy's raw intermediate output (search dumps, file bytes, whole generated files) back into Claude's context unreviewed — defeats the token saving and the quality gate.
- Never use
write/--dangerously-skip-permissionsfor destructive or irreversible actions, or outside a scoped dir. - Never trust a delegated result blindly for anything that matters — verify the answer, review the draft.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

