asnnetworks/floh-skills/image-gen

Claude Code and agent skill by asnnetworks/floh-skills

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate and edit raster images by driving a local coding-agent CLI that has an image tool — Codex (ChatGPT/OpenAI images) or Antigravity (Google Gemini images). Use whenever the user asks for an image to be generated, drawn, rendered, or made — 'generate an image of X', 'make me a picture', 'ask codex to draw Y', 'use gemini to generate Z', 'have codex picture what W looks like'. Also use when the user asks for an EXISTING image to be edited, changed, re-posed or given a variant, or for a new image matching a reference image they already have — 'make her point instead of thumbs-up', 'same character but waving', 'one more pose for this set', 'make one in this style'. Images default to <repo-root>/claude-image-gen/<name>-<provider>.png; also use this skill when the user names a different export folder or filename, such as the Desktop. Honour an explicitly named provider (codex / chatgpt / openai vs antigravity / gemini / google); default to Codex when none is named. Do NOT use for SVG/vector or code-native graphics, or for charts and data visualization (use dataviz).

Install

npx vskill@latest install asnnetworks/floh-skills/image-gen

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as asnnetworks/floh-skills/image-gen.

Generating images through a local agent CLI

Claude has no image-generation tool. Two locally installed agent CLIs do. This skill drives them headlessly so an image request costs one command, not an investigation.

First run on a new machine

gen-image.sh runs scripts/preflight.sh before it does anything else, so a machine that cannot generate an image says so in a second rather than after a two-minute run that was never going to work.

bash
scripts/preflight.sh # human-readable
scripts/preflight.sh --json # for you to parse
scripts/preflight.sh --force # re-check after the user installs something
ExitMeansWhat you do
0at least one provider is installed and usableproceed
1installed but something is off (not signed in, untrusted workspace, no python3)relay the warning, then proceed; it may still work
2neither provider installedstop. Give the user the install instructions it printed

On exit 2, do not fall back to an SVG or a CSS drawing. That is a different deliverable and the user did not ask for it. Say which providers you looked for and where.

How "first run" is detected. State lives at ~/.cache/floh-image-gen/preflight.json. No file means this skill has never run here, which is exactly when to check everything and walk the user through setup. When the file is there, preflight compares a fingerprint of the environment (each binary's path, size and mtime, plus the mtime of the Antigravity settings and of the Codex auth file) against the stored one. Unchanged means every probe is skipped, so the steady-state cost is a few stat calls. Changed means a re-check, because an upgrade, a reinstall or an edited settings file is precisely when a cached "it worked once" becomes a lie.

Set GEN_IMAGE_SKIP_PREFLIGHT=1 to bypass it, and GEN_IMAGE_STATE_DIR to move the state.

Provider selection

  1. The user named one — obey it. "codex" / "chatgpt" / "openai" → codex.

"antigravity" / "agy" / "gemini" / "google" / "nano banana" → antigravity.

  1. No provider named → Codex.
  2. Codex missing → Antigravity, and say plainly which one you used.
  3. Neither installed → do not improvise an SVG. Report it and give the install

instructions at the bottom of this file. The script prints them too.

Do not silently switch providers after a failure — a failed Codex run is worth reporting, and the user may want a retry rather than a different model's aesthetic.

Verified environment (tested end-to-end, same brief through both)

Measured twice on different platforms. Use the row for the machine you are on; do not quote the other one's timings at the user.

PlatformAntigravityCodex
macOS (2026-07-29)17 s, 1024×1024 JPEG2 m 21 s / 1 m 41 s, 1254×1254 PNG
Linux / Ubuntu (2026-07-31)~20 s, 1024×1024 JPEG, 864 KB~2 m 30 s, 1254×1254 PNG, 2.7 MB

The Linux run used the same brief as the macOS run (an open brass compass on oak, top-down, "no text or lettering anywhere") and reproduced the difference below independently: Codex obeyed the no-text instruction completely, Antigravity still engraved N/E/S/W and degree numbers on the dial.

Detail (macOS reference machine)
CodexAntigravity
Binarycodex — ~/.npm-global/bin/codex, v0.145.0agy — ~/.local/bin/agy (not on `PATH`; call the absolute path)
Modelgpt-5.6-sol, effort xhigh (~/.codex/config.toml)Gemini 3.6 Flash (High) (~/.gemini/antigravity-cli/settings.json)
Image toolbuilt-in image_gen (via its own imagegen skill)built-in generate_image
AuthChatGPT sign-in. No `OPENAI_API_KEY` neededGoogle sign-in, already done
Headless flagcodex execagy --print / -p
Writes result to$CODEX_HOME/generated_images/<uuid>/~/.gemini/antigravity-cli/brain/<conv-uuid>/<slug>_<ts>.jpg
Output observedPNG, 1254×1254 from "square, high quality"JPEG, 1024×1024
Measured runs2 min 21 s, 1 min 41 s17 s

Both got identical briefs (a persimmon still life, then a brass compass) and both followed them faithfully. Codex is slower and more literal — tighter studio crops, closer to the words. Antigravity is dramatically faster and invents more scene around the subject (it added a window, a desk lamp, a leather wallet unprompted), and it read "no text or lettering" as no overlay text while still engraving N/E/S/W on the compass dial.

Reach for Antigravity when speed matters or you want an atmospheric photograph; Codex when the brief is exacting and extra props would be wrong.

Where the image goes

Unless the user says otherwise, every generated image lands at:

<repo-root>/claude-image-gen/<descriptive-name>-<provider>.png
  • <repo-root> is the git root of the working directory, falling back to the working

directory itself when it isn't a repo. The folder is created if absent.

  • <descriptive-name> is a real name for the subject — brass-compass-desk,

claude-portrait, hero-banner-dark — not image1 or output. Pass it with --name; the script otherwise slugs the brief's first line, which is a fallback, not a good name.

  • <provider> is codex or antigravity, so the file says which model drew it.

It is the provider, deliberately, not the raw image-model id: Codex does not expose which image model its built-in tool used (its log mentions both gpt-image-1.5 and gpt-image-2 only because its own skill doc names both), and agy self-reports imagen-3.0-generate-002, which is an unverified self-claim. Don't bake a guess into a filename.

A user-specified folder or filename always wins — pass --dest. Only then does the image go somewhere else, and never overwrite: existing names get -v2, -v3.

The original always lands here, even when the deliverable doesn't. Often the generated image is raw material rather than the finished asset: it gets cropped, rescaled, converted, and dropped into the project somewhere specific. When that happens the derived asset goes to its project path and the untouched generator output still goes to claude-image-gen/. Do not leave it in a scratch directory — that is gone at the end of the session, and the generation is not reproducible.

Keep both halves when post-processing happened:

FileWhat
<name>-<provider>.pngthe output as the generator delivered it
<name>-<provider>-chroma.pngthe pre-chroma-key version, when a green screen was used
<name>-vN-rejected-<provider>.pngearlier attempts, when it took more than one round

The full-resolution original is typically 3–5× the size the project ends up using. Without it, a later re-crop, a different scale, or a different matte setting means re-generating — and the model will not draw the same image twice.

The fast path

bash
~/.claude/skills/image-gen/scripts/gen-image.sh \
[--provider codex|antigravity] [--name <slug>] [--dest <path>] \
[--edit <image>] [--ref <image>]... [--file <path>]... <brief-file>

--edit changes one thing about an existing image and carries the rest over. --ref supplies style/character references for a fresh generation and repeats. Both stage their inputs inside the agent's workspace, flattening alpha onto white on the way in — hand a model a transparent cutout and it may composite it on black and faithfully match the silhouette. In edit mode the default slug becomes <source-name>-edit.

--file stages a project file the agent reads for itself — a component, a token sheet, a copy deck. Repeatable. See Generating from your project below for when to reach for it.

bash
# one more pose for an existing set — prefer this over describing the character
gen-image.sh --edit avatar-thumbs-up.png --name avatar-pointing brief.txt
# fresh image, but in the house style
gen-image.sh --ref master.png --ref hands.png --name avatar-waving brief.txt
# a mockup that has to agree with the product's real palette and vocabulary
gen-image.sh --file src/theme/tokens.ts --file docs/brand.md --name dashboard-mockup brief.txt

Defaults to auto (Codex, else Antigravity) and to the destination above. The script picks the provider, runs it in a throwaway workspace, converts the format if the destination extension disagrees with what the provider emits, and copies the result out. It prints the final path, dimensions, and the agent's closing message; the 60 KB event stream goes to a log file instead of your context.

Write the brief with the Write tool. Never inline a long prompt in a shell string — an apostrophe in "Anthropic's" will break the quoting.

Then always `Read` the resulting image. You cannot describe or vouch for a picture you have not looked at, and both agents occasionally return something other than what was asked.

Driving them by hand

When the script doesn't fit — edits, variants, reference images:

Codex. Sandbox it and feed the prompt on stdin.

bash
cat brief.txt | codex exec -C "$WORK" --skip-git-repo-check -s workspace-write \
-o "$WORK/last-message.txt" - > "$WORK/run.log" 2>&1

--skip-git-repo-check is required (a scratch dir is not a repo). -o captures only the final message. Tell Codex to copy its chosen output into its working directory under a fixed name, or you are left guessing at a session UUID.

Antigravity. Three constraints that are easy to trip over:

  • Headless mode auto-denies permission-gated tools unless an allow-rule covers them —

otherwise run_command / write_to_file abort the run with a "headless mode cannot prompt" error. generate_image needs no permission at all, so the image path works with zero config: tell agy explicitly not to run shell commands or write files, and to print the absolute image path instead. Claude copies the file afterwards.

  • --dangerously-skip-permissions would lift everything, but Claude Code's own classifier

blocks the flag and it auto-approves every tool. Don't reach for it.

  • Run agy with a cwd inside one of its `trustedWorkspaces`. An untrusted workspace can

stall it at start. Do not hardcode a path for this: on macOS /private/tmp is trusted and $TMPDIR (/var/folders/...) may not be, while on a Linux box trustedWorkspaces was ["/root"] only, which makes /tmp untrusted and /private/tmp non-existent. The script's scratch_base() reads ~/.gemini/antigravity-cli/settings.json and picks a covered, writable directory (preferring ~/.cache/gen-image); GEN_IMAGE_TMPDIR overrides it.

Scrub the environment before you spawn

Agent-harness variables leak into the child process and get read as instructions. Measured: with ARGUS_BOARD_CMD exported, a Codex run spent six turns doing task-board diagnostics before it drew anything, then reported on the board rather than on the image.

Strip ARGUS_*, CLAUDE_* and ANTHROPIC_* from the child environment before invoking either CLI. Anything your own harness exports is a prompt the sub-agent did not ask for.

Portability

The script runs on macOS and Linux. Three things in the original were macOS-only and are now shimmed, with macOS behaviour unchanged:

WasProblemNow
mktemp -d /private/tmp/...that path does not exist on Linux, so mktemp fails outrightscratch_base(), driven by agy's own trustedWorkspaces
stat -f '%m %N'BSD-only; GNU coreutils needs -c '%Y %n' and errors on -fnewest_image() in python3
sipsmacOS-only, and magick/convert are not guaranteed eitherimg_convert() / img_dims(), sips first then Pillow

The stat one matters more than it looks: it sits in both fallback paths, so on Linux a run that needed the fallback reported "no image produced" while the image sat on disk. A failure that presents as absence is the expensive kind.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/asnnetworks/floh-skills/image-gen/badge)](https://verified-skill.com/skills/asnnetworks/floh-skills/image-gen)

Something wrong with this skill or its page? Tell us.