agentleFS
jonathanmalkinjonathanmalkin/jules/.claude/skills/generate-image-openai/SKILL.md

generate-image-openai

Skill65 starsChanged 7 months agoMITView on GitHub

Generates images using OpenAI/DALL-E/GPT image models with an iterative two-phase workflow: fast drafts for iteration, high-quality final render on approval. Triggers on 'generate an image', 'create a picture', 'make me an illustration', 'DALL-E', or any image creation task. Do NOT use for diagrams or flowcharts (use /diagram or /excalidraw-diagram).

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before touching the script, ask targeted questions to nail the prompt.

    line 18
  2. Distinctive:

    Don't over-ask — 2-3 targeted questions if the prompt is ambiguous.

    line 28
  3. Distinctive:

    Read the saved PNG with the Read tool to view it

    line 42
  4. Distinctive:

    If the draft is clearly far off (wrong style, wrong subject), surface that before burning more iterations — a prompt restart is cheaper …

    line 47
  5. Distinctive:

    After 2-3 draft iterations, present to [Your Name]:

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

OpenAI Image Generation — Iterative Workflow

Two-phase workflow: fast drafts for iteration, high-quality final render on approval.

Cost per successful session: ~$0.21 (3 draft iterations + 1 final render)


Phase 1: Clarify Before Generating

Before touching the script, ask targeted questions to nail the prompt. Typical clarifiers:

  • Subject/scene: What's in the image? Who or what is the focus?
  • Style: Photorealistic, illustration, watercolor, vector, cinematic, cartoon?
  • Composition: Wide shot, close-up, overhead, centered?
  • Mood/lighting: Warm/cool, dramatic/bright, moody/clean?
  • Background: Specific setting or transparent/solid color?
  • Text content: Any words/labels to include?
  • Aspect ratio: Square (1:1), landscape (3:2), portrait (2:3)?

Don't over-ask — 2-3 targeted questions if the prompt is ambiguous. Clear prompts skip directly to generation.


Phase 2: Draft Iterations

Model: gpt-image-1-mini at high quality — fast (~10s), good quality, cheap ($0.052/image)

.claude/scripts/generate-image.sh "<prompt>" [output_dir] [filename]
# Uses defaults: model=gpt-image-1-mini, quality=high, size=auto

After each generation:

  1. Read the saved PNG with the Read tool to view it
  2. Assess against the user's intent — composition, style, accuracy
  3. Note what's working and what needs refinement
  4. Adjust the prompt and regenerate (target 2-3 iterations max)

If the draft is clearly far off (wrong style, wrong subject), surface that before burning more iterations — a prompt restart is cheaper than 3 bad drafts.


Phase 3: Present for Approval

After 2-3 draft iterations, present to [Your Name]:

  • Display the best draft
  • Note what changed across iterations
  • Identify any remaining gaps

Two outcomes:

  • Approved → proceed to Phase 4 (final render)
  • Major changes needed → restart from Phase 1 with new direction

Phase 4: Final Render

On approval, generate the high-quality final:

.claude/scripts/generate-image.sh "<refined-prompt>" [output_dir] [filename] gpt-image-1 high

Model options for final:

ModelCostBest for
gpt-image-1 high~$0.167Highest OpenAI quality, transparent PNG support
gpt-image-1-mini high$0.052When draft quality is already sufficient

Note: Google imagen-4.0-ultra ($0.060) delivers better quality per dollar for final renders and supports 4K output — but requires a separate script (not yet implemented). OpenAI gpt-image-1 is the current final-render default.


Script Reference

.claude/scripts/generate-image.sh "<prompt>" [output_dir] [filename] [model] [quality] [size]
ParameterDefaultOptions
promptrequiredText description
output_dircurrent dirAny path
filenameauto from promptCustom (no extension)
modelgpt-image-1-minigpt-image-1-mini, gpt-image-1
qualityhighlow, medium, high, auto
sizeauto1024x1024, 1536x1024, 1024x1536, auto

Prompt Tips

  • Style: "watercolor", "photorealistic", "vector logo", "cyberpunk", "flat illustration"
  • Composition: "overhead shot", "close-up portrait", "centered on white background"
  • Lighting: "warm amber lighting", "moody cinematic", "soft diffused light"
  • Text: explicitly state the text content and typography style
  • Negative space: "minimal", "clean background", "product on white"

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.