imagegen
Installation
SKILL.md
imagegen
Keyless headless image generation. No GEMINI_API_KEY, OPENAI_API_KEY, or NANOBANANA_API_KEY. Each backend uses the CLI's own account authorization.
Use the bundled CLI
bin/imagegen.sh -p "<prompt>" -o out.png # default backend: codex
bin/imagegen.sh -p "<prompt>" -o out.png -b agy # Antigravity CLI headless
bin/imagegen.sh -p "edit: purple sky" -o out.png -r base.png # -r reference image
Prints the absolute path of the generated file on stdout. When installed via the agents sync, the wrapper is also on PATH as imagegen.sh.
Backends
- codex (default, VERIFIED working): Codex CLI built-in image gen.
codex execruns headless;$imagegeninvokesgpt-image-2via the ChatGPT plan login. Renders to~/.codex/generated_images/<session>/then copies to your path. Counts toward Codex plan usage, not API billing. - agy (VERIFIED 2026-11-09, the expected Antigravity route):
agy --model <m> --mode accept-edits -p "<instr>"runs headless, and the agent's built-in image tool writes a 1024x1024 PNG to the path you name.agy modelslists no image model; the tool still works. Model viaIMAGEGEN_AGY_MODEL(defaultgemini-3.8-flash-medium). Two rules:-pgoes last, because agy reads the token right after-pas the prompt; and use--mode accept-edits, never--dangerously-skip-permissions, which Claude Code auto mode refuses as an unsafe agent. - antigravity (legacy, entitlement-gated): drives the bundled
bin/generate_image.pydirectly against the CloudCode API with the Antigravity OAuth creds. NeedsANTIGRAVITY_OAUTH_CLIENT_IDandANTIGRAVITY_OAUTH_CLIENT_SECRETin the environment (never distributed with this skill); free-tier accounts get HTTP 404. Prefer-b agy.