agentleFS
bugrackmbugrackm/My-Agent-System-and-Skills/skills/codex-image/SKILL.md

codex-image

Skill0 starsChanged 11 days agoMITView on GitHub

Generate raster images of any kind (illustrations, icons, logos, banners, thumbnails, wallpapers, photo-style scenes, game sprites and backgrounds, UI art, slide or README visuals) by running Codex CLI's image generation as a subagent, since Claude cannot make images itself. Use whenever a task needs a new or edited bitmap image or a variant of an existing one, in any project or none, instead of handing the user a prompt to paste into another tool.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use contact-vcard-extractor, free-tts and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenMinisSkill

    contact-vcard-extractor

    Extract contact information from text, chat logs, web pages, screenshots, business card photos, and QR codes/OCR results; clean names, phone numbers, email addresses, companies, job titles, addresses, and websites; generate vCard/.vcf files; and guide users to import them into iOS Contacts or share them with others. Trigger words include: extract contacts, save to contacts, generate vCard/.vcf, business card recognition, add contacts from images/screenshots/text, share contacts, and export contacts.

    Also in 3 projects that use this

  • OpenMinisSkill

    free-tts

    Free text-to-speech (edge-tts), with no API key or registration required. Converts text to MP3 audio files. Trigger this skill when the user says "read aloud," "text-to-speech," "TTS," "generate audio," "read it," "read it out loud," "say it," "play it," or in any scenario where text needs to be converted to speech for playback.

    Also in 3 projects that use this

  • +10 more from OpenMinis

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the prompt in English: subject, style, view/angle, size/aspect if it matters, "transparent background" for cut-outs, "no text" unless …

    line 31

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codex image

Claude can't generate images; Codex can, on the user's ChatGPT subscription (no API billing; the script refuses to run if Codex isn't on the ChatGPT login). Do not hand the user a prompt to paste elsewhere: generate the image, look at it, and use it.

Run

scripts/codex-image.sh -o <out-dir> -n <name> [-c 1-4] [-i ref.png ...] [-m <model>] "<prompt>"

The script is scripts/codex-image.sh inside this skill's folder; use its absolute path when calling it.

  • Prints <path> <w>x<h> <RGBA|RGB> per saved file. Takes ~30 s per image; give the shell call a 400 s timeout.
  • Defaults: Codex's configured model (set CODEX_IMAGE_MODEL or pass -m <model> to override), effort low, read-only sandbox. Codex only writes the image prompt, so a cheap model (<cheap-model>) is enough; use <strong-model> only if the request needs real visual reasoning. List current models with codex or check ~/.codex/models_cache.json.
  • -i attaches reference images: an image to edit, or the first accepted image of a set (or a project's existing art) so outline, shading and palette stay consistent. Style matching works.
  • Write the prompt in English: subject, style, view/angle, size/aspect if it matters, "transparent background" for cut-outs, "no text" unless text is wanted.
  • Out dir: the project's asset folder when the image belongs to a project; otherwise ~/Pictures/codex-image/ to keep, or a temp/scratch folder for throwaway checks.

After generating

  1. Open the image (Claude Code: the Read tool) and judge it against the request before using it. Regenerate with a sharper prompt if it misses; don't pass a weak image along.
  2. Fit it to the target: crop to the alpha bounding box and resize with PIL (python3 -I), keep the original in the output folder or scratch folder until accepted.
  3. Show the user the result with its path. Into a project repo only as part of the task's normal change; commits still follow the usual rules.

Gotchas

  • Without the script's brief, Codex tries to save the image itself (base64 in a shell command), fails and regenerates; one test burned 4 images for 1. Generated files land automatically in ~/.codex/generated_images/<session-id>/; the script copies from there.
  • codex exec -i is variadic: it swallows a prompt placed after it. The script puts the prompt first.
  • Output size is chosen by the model (seen: ~1250-1536 px), not always square. Transparent backgrounds come back as real RGBA.
  • Each image uses Codex plan limits. Ask for 1 image by default; use -c 2-4 only when comparing options is worth it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.