agentleFS
Emmet-RayEmmet-Ray/skills/image-generator/SKILL.md

image-generator

Skill0 starsChanged 3 months agoMITView on GitHub

Generate, edit, or batch-generate raster images with the bundled GPT Image CLI. Use when a user asks for image generation through this local skill, needs batch image jobs, wants to edit existing images with prompts, or needs to configure or diagnose the image API runtime.

  • Reads credentials
  • Installs packages

6 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. wlzh/skills★ 617same name
    2. felvieira/claude-skills-fv★ 23same name
    3. mjunaidca/robolearn★ 9same name
    4. c-b-g-m/claude-code-quickstart★ 1same name
    5. hyforthy/skills★ 1same name
    6. SallyKAN/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the bundled scripts instead of rewriting image API calls.

    line 8
  2. Very specific:

    Use scripts/image_gen.py for image generation, image editing, dry runs, and JSONL batch jobs.

    line 12
  3. Very specific:

    Use scripts/runtime.py only when dependencies or API configuration need setup or diagnosis.

    line 13
  4. Very specific:

    Prefer --backend auto. It uses local Codex OAuth auth when available, then falls back to the OpenAI SDK with OPENAI_API_KEY.

    line 14
  5. Distinctive:

    Keep prompts exactly as the user requested unless they ask for prompt improvement.

    line 15
  6. Distinctive:

    Write outputs to a project-local path unless the user gives another destination.

    line 16
  7. Distinctive:

    Create or update the shared runtime:

    line 26
  8. Distinctive:

    Run a dry run before calling the API:

    line 63
  9. Very specific:

    Use JSONL where each non-empty line is either a prompt string or an object with a prompt field:

    line 75
  10. Very specific:

    Default runtime home: ~/.image-generator.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Image Generator

Use the bundled scripts instead of rewriting image API calls. The scripts handle backend selection, request validation, retries, output decoding, and batch concurrency.

Workflow

  1. Use scripts/image_gen.py for image generation, image editing, dry runs, and JSONL batch jobs.
  2. Use scripts/runtime.py only when dependencies or API configuration need setup or diagnosis.
  3. Prefer --backend auto. It uses local Codex OAuth auth when available, then falls back to the OpenAI SDK with OPENAI_API_KEY.
  4. Keep prompts exactly as the user requested unless they ask for prompt improvement.
  5. Write outputs to a project-local path unless the user gives another destination.

Common Commands

Install dependencies in the active environment:

python -m pip install -r image_generator/scripts/requirements.txt

Create or update the shared runtime:

python image_generator/scripts/runtime.py bootstrap
python image_generator/scripts/runtime.py doctor

Configure OpenAI SDK credentials when Codex OAuth is unavailable:

python image_generator/scripts/runtime.py config \
  --api-key "your-api-key" \
  --model gpt-image-2 \
  --backend openai

Generate one image:

python image_generator/scripts/image_gen.py generate \
  --backend auto \
  --prompt "A clean 16:9 presentation cover about blockchain infrastructure" \
  --size 2048x1152 \
  --quality medium \
  --out output/image.png

Edit an existing image:

python image_generator/scripts/image_gen.py edit \
  --backend auto \
  --image input.png \
  --prompt "Keep the layout, improve contrast, and make the title more readable" \
  --out output/edited.png

Run a dry run before calling the API:

python image_generator/scripts/image_gen.py generate \
  --backend auto \
  --prompt "test image" \
  --out output/test.png \
  --dry-run

Batch Jobs

Use JSONL where each non-empty line is either a prompt string or an object with a prompt field:

{"prompt":"Slide cover, blue-green editorial tech style","out":"slide_01.png"}
{"prompt":"Architecture overview diagram as a polished slide","out":"slide_02.png"}

Then run:

python image_generator/scripts/image_gen.py generate-batch \
  --backend auto \
  --input jobs.jsonl \
  --out-dir output/images \
  --size 2048x1152 \
  --quality medium

Notes

  • Default model: gpt-image-2.
  • Default runtime home: ~/.image-generator; override with IMAGE_GENERATOR_HOME.
  • New runtime config uses IMAGE_GENERATOR_IMAGE_MODEL and IMAGE_GENERATOR_IMAGE_BACKEND.
  • Legacy IMAGE2_* and CODEX_PPT_* variables are still read for compatibility.
  • For transparent backgrounds, use --model gpt-image-1.5 --background transparent; gpt-image-2 does not support transparent backgrounds.

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.