/ramtoshiya:imagegenfrom ramtoshiya
Generate or edit raster images (photos, illustrations, product shots, UI mockups, textures, sprites, transparent cutouts) with OpenAI GPT Image 2.5 or xAI Grok Imagine through a bundled script that calls an OpenAI-compatible Images API. Use when the user asks to create, draw, render, restyle, or edit an image, or when a task needs a new bitmap asset. Do not use for diagrams, icons, or logos that belong in SVG, HTML/CSS, or canvas, or to extend an existing vector asset set.
Ships in ramtoshiya. 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.
Checked against the OpenAI and xAI image guides and CLIProxyAPI 8.0.29 on 2026-10-15. When an API changes,
update scripts/imagegen.py, references/providers.md, and this line together.
<skill-dir> is the directory holding this file. The script needs only the Python standard library. Run it
as uv run --no-project python <skill-dir>/scripts/imagegen.py ....
The script reads the endpoint and key from the environment. It never takes a key as an argument. Do not ask
the user to paste a key into the chat. If nothing is configured, the script exits 2 and names the variable
to set.
To configure the endpoint and key, read references/setup.md, which lists each
route and its environment variables.
| Model | Use for |
|---|---|
gpt-image-2.5-sunburst (default) | Final assets, small or exact text, precise edits, transparent cutouts |
gpt-image-2.5-flare | Fast drafts and many variants. OpenAI rates its quality close to GPT Image 2 |
grok-imagine-image-2.0 | A different look when the user asks for Grok. No transparency and no masks |
Use gpt-image-2 or older models only when the user asks for them. xAI retires
grok-imagine-image-quality on 2026-11-02.
generate. When the user wants an existing
image changed, run edit with that image. Images given only as references for subject, style, or layout
also go through edit, one --image each, and the prompt says how to use them.--quality low while exploring and medium or higher for the final image,
especially when it contains text.files with your image-viewing tool and check it
as described in Check the result. The notes array lists requested settings the
service did not apply.--image
and restate everything that must stay the same.--out, and update the code or documents that reference them.notes reports a different aspect ratio, restate it in the prompt and try once
more, or crop locally."alpha": true? A drawn checkerboard is not transparency.If a region must stay pixel-identical, composite the approved edit into the original instead of relying on the prompt.
Exit 1 means the service or network failed. Stderr has the service's message and a hint. Do not retry
moderation blocks, quota or credit errors, or auth_unavailable. Report them to the user. A timeout on a
proxy route usually means the upstream closed the request after about 120 seconds, so lower the quality or
simplify the prompt before one more try. Exit 2 means a bad option or missing configuration, and the
message names it.
For GPT Image, labeled lines work well when a request has several requirements. Leave out lines that add nothing.
Intended use: landing page hero, wide 16:9 landscape
Subject: a white ceramic mug of black coffee
Scene: oak desk by a window, plant and notebook in soft focus
Style: clean product photography
Lighting and mood: warm morning light from the left
Text (exact): none
Avoid: logos, watermarks
--aspect or --size. Some routes
ignore the size setting and follow the prompt.--background transparent --format png. If the prompt describes a scene, the model paints that scene
instead of transparency.For Grok, write four to six plain sentences that describe one picture. Open with the subject and what holds it, then the setting, light, and crop. Keep avoid-lists short. For an edit, lead with the one to three changes, then add one sentence keeping the same subject, angle, and crop.
Add --dry-run to print the request without sending it. --help lists every option. The ones that depend
on the provider are --size, --background, --format, --compression, and --mask (GPT Image only),
and --resolution 1k|2k (Grok only). --aspect works for both.
The saved file's extension follows the bytes the service returned, so --out hero.jpg may save
hero.png. The script does not overwrite an existing file. It writes hero-v2.png instead unless
--force is given. Without --out, files go to output/imagegen/ under the current directory.
# New image. A prompt file avoids shell quoting problems with long prompts.
uv run --no-project python <skill-dir>/scripts/imagegen.py generate \
--prompt-file /tmp/prompt.txt --aspect 16:9 --quality low --out assets/hero.png
# Edit an image, or build a new one from references (repeat --image).
uv run --no-project python <skill-dir>/scripts/imagegen.py edit \
--image assets/photo.png --prompt "Change only the mug to matte navy. Keep everything else." \
--out assets/photo-navy.png
# Transparent cutout (GPT Image only).
uv run --no-project python <skill-dir>/scripts/imagegen.py generate \
--prompt "A single red apple, isolated, no backdrop, no shadow." \
--background transparent --format png --out assets/apple.png
# Grok.
uv run --no-project python <skill-dir>/scripts/imagegen.py generate \
--model grok-imagine-image-2.0 --prompt-file /tmp/prompt.txt --aspect 3:2 --quality medium
references/providers.md lists each provider's parameters and limits, and what the CLIProxyAPI routes
actually do with them.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
14 skills in this plugin
/excalidraw-boardUse when a user asks agents to read, draw, or export selected objects as PNG from a shared excalidraw.com room, or a collaborator references a room id, revision, and element ids. Uses separately installed excalidraw-board and, for PNG export, excalidraw-web-export commands./figma-restUse when reading anything out of a Figma design file — design tokens, colors, type/spacing scales, node structure, or rendered node images — and when a Figma MCP tool returns a rate-limit or "nothing selected" error. Prefer the REST API over the Figma MCP server, which is capped per seat./github-actions-authoringUse before creating or editing .github/workflows/*.yml, .github/workflows/*.yaml, action.yml, or action.yaml anywhere in a repository, even for a small non-version change. Verify every remote uses dependency against its official GitHub releases, enforce a 72-hour release cooldown, inspect compatibility and security, and pin original-repository commit SHAs. Never choose action versions from model memory.npx claudepluginhub ramtoshiya/skills --plugin ramtoshiya