agentleFS
laurentvvlaurentvv/agents-kit/skills/agy/SKILL.md

agy

Skill0 starsChanged 34 days agoMITView on GitHub

Generate and iterate images with Google Antigravity's agy CLI in headless mode, and script non-interactive agent runs with machine-readable output. Use whenever the user asks for a generated or edited image (illustration, texture, icon, concept art, variation), mentions agy or Antigravity, or wants an agent run from a script, a batch or CI.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use codex.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • engtySkill

    codex

    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify THREE things before claiming success - a denied run still exits 0 with status SUCCESS:

    line 35
  2. Very specific:

    Do not assume jq is installed - parse with Python:

    line 96

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

agy - headless Antigravity CLI

agy (Google Antigravity) runs an agent non-interactively: one prompt in (-p), the response on stdout, diagnostics on stderr, process exits. It reuses the logged-in account's cached credentials - authenticate once with an interactive agy session before any headless use.

Everything below was verified live on agy 1.2.16 (Windows 11, Git Bash), 2026-10-04. Official reference: https://antigravity.google/docs/cli/headless/

Generate an image (the core recipe)

Image generation is an agent TOOL (generate_image, delegated to an image-generator subagent), not a model slug: agy models lists text models only, any of them can drive the generation. The image bytes are produced server-side; the agent then copies the file into the working directory with a shell command - and that copy is the whole permission problem.

  1. Work from a disposable directory (scratch/..., a temp dir): the run needs --dangerously-skip-permissions (see below), so give it nothing valuable to touch.
  2. One image, one command:
mkdir -p scratch/agy-images && cd scratch/agy-images
agy -p "Generate an image: <subject, color/material, background, lighting, framing>. Save it as <name>.png in the current directory." \
    --dangerously-skip-permissions --output-format json
  1. Verify THREE things before claiming success - a denied run still exits 0 with status SUCCESS:
    • the envelope has .status == "SUCCESS" AND denied_actions absent or empty,
    • the file exists on disk with the right magic bytes (PNG / JPEG),
    • the image was actually LOOKED at (open it, screenshot it, vision pass): verified means seen.
uv run --no-project python -c "import pathlib; b=pathlib.Path('<name>.png').read_bytes()[:8]; print('PNG' if b.startswith(b'\x89PNG\r\n\x1a\n') else b)"

Why --dangerously-skip-permissions

  • The final file copy runs through run_command; in headless mode an unapproved command is SOFT-DENIED: the run "succeeds" (exit 0, status SUCCESS, empty or partial response) and the envelope carries denied_actions - the image never lands in the working directory.
  • Telling the agent to "use cp" does NOT reliably hit an existing permissions.allow rule - verified twice, denied both times.
  • write_to_file cannot carry binary image data (observed: junk test files, then a denial).

So keep the flag and contain the blast radius: disposable cwd, a prompt you wrote, nothing sensitive in reach. Scoped permissions.allow rules are the alternative when a run must work without the flag.

Salvage a denied run

The generation itself usually completed before the denied copy. The raw image waits under the CLI's brain directory, named after the prompt with a timestamp - and the extension can drift (a .png request landed as .jpg):

~/.gemini/antigravity-cli/brain/<conversation_id>/<prompt_name>_<timestamp>.jpg

Take conversation_id from the envelope, copy the newest file out, rename it.

Iterate on an image

Conversations continue headless: -c continues the most recent one, --conversation <id> a specific one. Reference-based edits (recolor, restyle, variation) work, reading the earlier image from the conversation context; expect roughly double the cost and duration of a fresh generation.

agy -c -p "Same subject, <change only>. Save it as <new-name>.png in the current directory." \
    --dangerously-skip-permissions --output-format json

Machine-readable output

  • --output-format text (default): the response text only.
  • --output-format json: one envelope at the end - conversation_id, status, response, error, duration_seconds, num_turns, usage (token counts) and denied_actions (undocumented in the official page, present in 1.2.16).
  • --output-format stream-json: NDJSON events (init, then step_update with tool calls, then one result) - the way to see WHICH tools ran.

Do not assume jq is installed - parse with Python:

agy -p "..." --output-format json | uv run --no-project python -c "import json,sys; e=json.load(sys.stdin); print(e['status'], e['response'])"

--json-schema constrains the answer to a schema; --model <slug> pins a model and fails loudly (exit 1) on an unknown slug; --effort low|medium|high trades depth for speed (1.2.16 also accepts xhigh|max).

Expectations and pitfalls (measured 2026-10-04, agy 1.2.16)

  • One image: 45-100 s and 45k-80k tokens; one reference edit: ~200 s and up to 166k cumulative tokens. Budget before batching.
  • The local binary can drift from the docs: 1.2.16 waits indefinitely by default (--print-timeout 0s; the docs describe a 5 m ceiling) - set the flag explicitly in scripts, and re-read agy --help on the target machine before trusting memorized flags.
  • The enclosing repository leaks into the run: agy reads the workspace AGENTS.md and .agents/skills/ of the cwd's repo (observed: replies in the repo's chat language, workspace skills auto-loaded). Run from a neutral directory unless that context is wanted.
  • CI or any terminal-less environment without cached credentials exits with authentication required instead of hanging.
  • --disable-slash-commands turns off slash-command and skill expansion in print mode.

Safety

--dangerously-skip-permissions approves every tool call of the run, file writes and shell commands included. Disposable directory, self-written prompt, nothing sensitive within reach - and never the user's working tree.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.