Hand image requests from Claude Code to Antigravity through a text file

Omar Benitez's team linked Claude Code and Google's Antigravity with a shared text file and 220 lines of bash, and made nine game art images in one afternoon without per-image API fees.

Done withClaude Code· Nov 9, 2026

What they did

The team behind the browser card game Sajkab makes a lot of art: card skins, standees and backgrounds. Image generation through the Gemini API is billed per image, while Google's Antigravity agent can use the same image model under its plan quota. Rather than copy prompts between the two apps by hand, they wrote one shared skill. Claude Code writes a request into a text file in the repo with the prompt, reference images, variant count and aspect ratio. A bash script polls the file every 30 seconds so the agent spends no tokens waiting. Antigravity picks up the request, generates the image and writes back the file path and a status. Claude Code then reads the reply and carries on. Both sides shut down after an hour of silence.

How it went

On the first real job, a new skin for the Jaguar Warrior card, they ran nine requests in a row in one afternoon with no manual steps, each taking 40 seconds to 2 minutes. The illustration needed four rounds of fixes, done by sending the previous image back as a reference with a narrow change. The run also produced the standee, a stadium background, and the article's own banner and diagram. Claude kept the conversation's context across rounds, which it had lost when the steps were done by hand.

Worth knowing

It handles one request at a time and uses atomic file moves so neither side reads a half-written file. Vague prompts caused trouble: asking for a weapon on the back gave two weapons, and a real team name copied an NFL logo. Antigravity is not yet in our agent list. The post also promotes the game.

Try it

With Claude Code· 4 parts to fill in

Set up a file-based mailbox so you can ask [my second agent, e.g. Antigravity] to make images for this repo. Create [docs/mailbox/requests.txt] where you write each request with the prompt, reference image paths, number of variants, aspect ratio and a PENDING status. Write a bash script that polls the file every [30] seconds so waiting costs no tokens, uses atomic moves for writes, and gives up after [1 hour] without a reply. Write the matching instructions the other agent will follow to answer with an image path and DONE or ERROR. Show me the script and both instructions before running anything.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related