/agent-patterns-plugin:agy-headlessfrom agent-patterns-plugin
Drives Antigravity CLI (agy) from Claude Code with headless prompts returning JSON results or a tmux-hosted TUI. Use when delegating tasks to agy or inspecting open agy sessions.
Ships in agent-patterns-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Run Google Antigravity CLI (agy) as a delegate from a Claude Code session and
read its result as data. Every call goes through
${CLAUDE_SKILL_DIR}/scripts/agy.sh, which pins the output format, maps agy's
JSON to KEY=VALUE lines, refuses to write into a conversation another agy
process has open, and can host an interactive agy in tmux for live use.
| Use this skill when... | Use instead when... |
|---|---|
| Handing a bounded task to agy and reading back its answer | Asking several models for a design opinion: agent-patterns-plugin:multi-model-delegation |
| Checking which agy conversation is live and what it last ran | Running this marketplace's skills inside agy: the Antigravity export doc in this repo |
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" status
AGY_VERSION= empty or STATUS=ERROR means agy or jq is not on PATH; stop and
report. Each LIVE=<id> pid=<pid> cmd=<cmd> line is a conversation an
interactive agy holds open.
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" run --dir <workdir> --timeout 600s -- "<prompt>"
Options: --model <id> (ids from agy models), --resume <conversation-id>,
--schema '<json-schema>' for structured output, --out <file> to keep the
raw JSON, --yolo for --dangerously-skip-permissions.
Read the result:
| Line | Meaning |
|---|---|
STATUS=SUCCESS, exit 0 | The text after --- is agy's answer |
STATUS=ERROR, exit 1 | REASON= holds agy's first error line; RAW= the full JSON |
STATUS=REFUSED, exit 2 | The wrapper declined (live conversation, bad usage); nothing ran |
Keep CONVERSATION_ID= to continue the same thread with --resume.
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" peek <conversation-id> 10
Prints the last N tool calls (CommandLine, toolSummary) the conversation
made, read from its SQLite store with sqlite3 -readonly. The store holds
protobuf blobs and has no published schema, so treat this as a best-effort view
of agy 1.5.x, not an API.
When the user wants to watch the conversation live, run agy in tmux and type into it:
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" tmux-start <session> --dir <workdir> -- --model <id>
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" tmux-send <session> --timeout 600 -- "<one-line prompt>"
bash "${CLAUDE_SKILL_DIR}/scripts/agy.sh" tmux-read <session> 40
The user can watch with tmux attach -t <session>. tmux-send types only
when the TUI's footer reads ? for shortcuts (idle), checks that the text
appeared on screen before pressing Enter, waits for the footer to return to
idle, and prints the lines between the echoed prompt and the input box. It
refuses (exit 2, nothing typed) on a busy turn (esc to cancel), a trust
prompt, a banner, or any screen it does not recognise. tmux-start stops at
a folder-trust prompt and leaves answering it to the user.
agy -p --conversation <id> while a TUI holds that conversation, but the TUI
does not reload it: its next turn is written over the same step rows, and the
headless turn is lost (agy 1.5.20, verified on a scratch conversation). Neither
SIGWINCH nor a resize reloads it; they only repaint. SIGHUP exits agy. The
wrapper refuses such a resume. To reach an open conversation, use the tmux
route if it runs in tmux, or have the user close that agy first.lsof -p "" lists every process. The wrapper
refuses empty or non-UUID ids.-c/--continue headless. It picks the most recent
conversation, which is usually the one the user has open."toolPermission": "proceed-in-sandbox", unlisted shell commands run in the
terminal sandbox without a prompt even in print mode. Headless runs start in
Auto mode where available. Point --dir at a scratch or worktree directory
when the task should not touch the current checkout.--timeout accordingly.Possible with token auth, untested here:
GEMINI_API_KEY is a supported sign-in (agy's changelog lists API-key fixes
for -p, plugins and models). Remote Control, --remote-agent and quota
commands are unavailable with an API key.AGY_ADC_AUTH with Application Default Credentials
(GOOGLE_APPLICATION_CREDENTIALS pointing at a service-account key) is the
Google Cloud route, billed to the project.| Context | Command |
|---|---|
| Is agy usable, what is live | agy.sh status |
| One-shot answer | agy.sh run --dir <d> -- "<prompt>" |
| Structured answer | agy.sh run --schema '<json-schema>' -- "<prompt>" |
| Continue a thread | agy.sh run --resume <id> -- "<prompt>" |
| What an open session last ran | agy.sh peek <id> 10 |
| Live, watchable session | agy.sh tmux-start <s> --dir <d>, then agy.sh tmux-send <s> -- "<prompt>" |
| Models | agy models |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub laurigates/claude-plugins --plugin agent-patterns-plugin26 skills in this plugin
/adversarial-reviewAdversarial second-pass review that tries to break code, designs, plans, or ADRs. Use when stakes are high and a normal review already ran./agent-cli-worktree-safetyData-loss invariants for a CLI that runs an agent SDK in a git worktree then force-removes it. Use when building or reviewing such a CLI, or when an agent run reports "no changes" after writing files./agent-teamsConfigure Claude Code agent teams (implicit team, SendMessage, TaskUpdate). Use when running parallel agents, coordinating with messaging, or setting up a lead/teammate architecture.Other plugins' skills for the same job