Skip to content
Back to skills

Image Gen

ASecurity

Generate or edit images (illustrations, logos, icons, mockups, hero images, avatars, photos) with Codex's built-in $imagegen skill. Use for /image-gen or whenever the user wants an image created or changed. Not for charts, data diagrams or SVG.

  • 2 stars
  • 0 votes
  • 1 copy
  • 17 views
  • Added October 22, 2026
ai-agentsgobashgit

Works with

  • cli

Security analysis

A100/100

Scanned October 22, 2026

npx -y skills add mijatovicmilan/image-gen --skill image-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Image Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Image Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mijatovicmilan-image-gen/badge)](https://www.skillsdirectory.com/skills/mijatovicmilan-image-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: image-gen
description: Generate or edit images (illustrations, logos, icons, mockups, hero images, avatars, photos) with Codex's built-in $imagegen skill. Use for /image-gen or whenever the user wants an image created or changed. Not for charts, data diagrams or SVG.
argument-hint: <what to draw>
---

Send the user's request to Codex unchanged (Bash timeout 600000 ms).
If the user gives existing images to edit or use as reference, add --image <absolute path> for each.

log=$(mktemp "${TMPDIR:-/tmp}/image-gen.XXXXXX")
codex exec --sandbox read-only --skip-git-repo-check [--image <path>] <<'EOF' 2>"$log" && rm -f "$log" || { echo "Codex failed (exit $?). Last lines of $log:"; tail -n 20 "$log"; }
$imagegen <user's request>

Reply with the absolute path of each image.
EOF

Keep the heredoc: without input on stdin, codex exec waits for it and hangs.

Check that each returned file exists. If generation failed or a file is missing, report the error and do not retry.
If the output starts with "Codex failed", show the user the error from those log lines. "401 Unauthorized" means Codex isn't logged in: tell them to run `codex login`.

Show every image in chat with SendUserFile (display: render) if available; otherwise give a clickable link to each file.
SendUserFile previews only files inside the session's folders or scratchpad, so first copy each image into your scratchpad directory (if you have one) and send the copy.

Images stay where Codex saved them. Copy them elsewhere only if the user asks for them to be saved or used somewhere (for example on a site or in app); then put them where that use needs them.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.