From openai-skills-13
Generates or edits raster images using AI for bitmap visuals like photos, illustrations, textures, sprites, mockups in projects. Uses built-in image_gen tool; CLI fallback requires OPENAI_API_KEY. Avoid vector/SVG/code assets.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin openai-skills-13This skill uses the workspace's default tool permissions.
Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).
This skill has exactly two top-level modes:
image_gen tool for normal image generation and editing. Does not require OPENAI_API_KEY.scripts/image_gen.py CLI. Use only when the user explicitly asks for the CLI path. Requires OPENAI_API_KEY.Within the explicit CLI fallback only, the CLI exposes three subcommands:
generateeditgenerate-batchRules:
image_gen tool by default for all normal image generation and editing requests.OPENAI_API_KEY. Proceed only if the user explicitly asks for that fallback.scripts/image_gen.py workflow. Do not create one-off SDK runners.scripts/image_gen.py. If something is missing, ask the user before doing anything else.Built-in save-path policy:
$CODEX_HOME/* by default.image_gen tool. If a specific location is needed, generate first and then move or copy the selected output from $CODEX_HOME/generated_images/....$CODEX_HOME/* path.$CODEX_HOME/* path.hero-v2.png or item-icon-edited.png.Shared prompt guidance for both modes lives in references/prompting.md and references/sample-prompts.md.
Fallback-only docs/resources for CLI mode:
references/cli.mdreferences/image-api.mdreferences/codex-network.mdscripts/image_gen.pyThink about two separate questions:
Intent:
Built-in edit semantics:
view_image tool so the image is visible in the conversation context, then proceed with the built-in edit flow.Execution strategy:
image_gen call per requested asset or variant.generate-batch subcommand only when the user explicitly chose CLI mode and needs many prompts/assets.Assume the user wants a new image unless they clearly ask to change an existing one.
generate or edit.generate-batch.view_image first so the image is available in conversation context.image_gen rather than substituting SVG/HTML/CSS placeholders. If the request is for an icon, logo, or UI graphic that should match existing repo-native SVG/vector/code assets, prefer editing those directly instead.image_gen tool by default.input_fidelity, masks, output format, output paths, and network setup.$CODEX_HOME/generated_images/... path.$CODEX_HOME/generated_images/... path.Reformat user prompts into a structured, production-oriented spec. Make the user's goal clearer and more actionable, but do not blindly add detail.
Treat this as prompt-shaping guidance, not a closed schema. Use only the lines that help, and add a short extra labeled line when it materially improves clarity.
Use the user's prompt specificity to decide how much augmentation is appropriate:
Allowed augmentations:
Not allowed augmentations:
Classify each request into one of these buckets and keep the slug consistent across prompts and references.
Generate:
Edit:
Use the following labeled spec as shared prompt scaffolding for both top-level modes:
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's main prompt>
Input images: <Image 1: role; Image 2: role> (optional)
Scene/backdrop: <environment>
Subject: <main subject>
Style/medium: <photo/illustration/3D/etc>
Composition/framing: <wide/close/top-down; placement>
Lighting/mood: <lighting + mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Text (verbatim): "<exact text>"
Constraints: <must keep/must avoid>
Avoid: <negative constraints>
Notes:
Asset type and Input images are prompt scaffolding, not dedicated CLI flags.Scene/backdrop refers to the visual setting. It is not the same as the fallback CLI background parameter, which controls output transparency behavior.Quality:, Input fidelity:, masks, output format, and output paths belong in the explicit CLI path only. Do not treat them as built-in image_gen tool arguments.Augmentation rules:
change only X; keep Y unchanged).Use case: product-mockup
Asset type: landing page hero
Primary request: a minimal hero image of a ceramic coffee mug
Style/medium: clean product photography
Composition/framing: wide composition with usable negative space for page copy if needed
Lighting/mood: soft studio lighting
Constraints: no logos, no text, no watermark
Use case: precise-object-edit
Asset type: product photo background replacement
Primary request: replace only the background with a warm sunset gradient
Constraints: change only the background; keep the product and its edges unchanged; no text; no watermark
references/cli.md and references/image-api.md for quality, input_fidelity, masks, output format, and output-path guidance.More principles shared by both modes: references/prompting.md.
Copy/paste specs shared by both modes: references/sample-prompts.md.
Asset-type templates (website assets, game assets, wireframes, logo) are consolidated in references/sample-prompts.md.
These conventions apply only to the explicit CLI fallback. They do not describe built-in image_gen output behavior.
tmp/imagegen/ for intermediate files (for example JSONL batches); delete them when done.output/imagegen/.--out or --out-dir to control output paths; keep filenames stable and descriptive.Prefer uv for dependency management in this repo.
Required Python package:
uv pip install openai
Optional for downscaling only:
uv pip install pillow
Portability note:
uv pip install ... remains the preferred path.OPENAI_API_KEY must be set for live API calls.OPENAI_API_KEY when using the built-in image_gen tool.If the key is missing, give the user these steps:
OPENAI_API_KEY as an environment variable in their system.If installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active environment.
references/cli.mdreferences/image-api.mdreferences/codex-network.mdreferences/prompting.md: shared prompting principles for both modes.references/sample-prompts.md: shared copy/paste prompt recipes for both modes.references/cli.md: fallback-only CLI usage via scripts/image_gen.py.references/image-api.md: fallback-only API/CLI parameter reference.references/codex-network.md: fallback-only network/sandbox troubleshooting for CLI mode.scripts/image_gen.py: fallback-only CLI implementation. Do not load or use it unless the user explicitly chooses CLI mode.