agentleFS
BrickleRexBrickleRex/image-generation-skill/SKILL.md

image-generation

Skill2 starsChanged 58 days agoMITView on GitHub

Generate images from a text description by delegating to the codex CLI agent, which has a native image-generation model. Use this whenever the user wants to CREATE, generate, make, draw, render, design, or produce a picture, image, illustration, logo, icon, mascot, avatar, banner, hero image, background, poster, sticker, concept art, product shot, mockup, social / OG / thumbnail image, or any visual ASSET that must end up as an actual image file on disk — even when they don't say the word "image" (e.g. "make me a logo for my coffee shop", "I need a hero graphic for the landing page", "draw a cute robot for the app"). Also use it to EDIT or restyle an existing image (provide it as a reference). Every run writes the final PNG to an exact output path the caller specifies — that delivered file is the whole point. Do NOT use this for reading/describing an existing image, for data charts/graphs (write code instead), or for Figma/diagram work.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use gift-evaluator, Podcast Generate 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.
  • jjyaoaoSkill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 4 projects that use this

  • jjyaoaoSkill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 4 projects that use this

  • michaelboedingSkill

    music-generation

    Use this skill for AI music generation. Triggers include: "generate music", "create a song", "make music", "compose", "create a beat", "generate audio", "make a soundtrack", "create a jingle", "instrumental music", "background music", "lo-fi beats", "electronic music" Supports vocals (Suno/Udio) and instrumental-only (Google Lyria).

    Also in 4 projects that use this

  • michaelboedingSkill

    video-generation

    Use this skill for AI video generation. Triggers include: "generate video", "create video", "make video", "animate", "text to video", "video from image", "video of", "animate image", "bring to life", "make it move", "add motion", "video with audio", "video with dialogue" Supports text-to-video, image-to-video, video with dialogue/audio using Google Veo 3.1 (default) or OpenAI Sora.

    Also in 10 projects that use this

  • MindrallySkill

    llm

    Large Language Model development, training, fine-tuning, and deployment best practices.

    Also in 4 projects that use this

  • SuperInstanceSkill

    aminer-data-search

    使用 AMiner 开放平台 API 进行学术数据查询与分析。当用户需要查询学者信息、论文详情、机构数据、期刊内容或专利信息时使用此 skill。 触发场景:提到 AMiner、学术数据查询、查论文/学者/机构/期刊/专利、学术问答搜索、引用分析、科研机构分析、学者画像、论文引用链、期刊投稿分析等。 支持 6 大组合工作流(学者全景分析、论文深度挖掘、机构研究力分析、期刊论文监控、学术智能问答、专利链分析)以及 28 个独立 API 的直接调用。 即使用户只说"帮我查一下 XXX 学者"或"找找关于 XXX 的论文",也应主动使用此 skill。

    Also in 3 projects that use this

  • +2 more from jjyaoao

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 33 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every generation MUST specify an absolute --output path, and the job is not done until a valid image file exists there.

    line 30
  2. Distinctive:

    Show the result: Read the output file back to confirm it matches the brief, then tell the user the path.

    line 68
  3. Very specific:

    One asset per run: Ask for a single final image unless the user wants variations.

    line 91
  4. Distinctive:

    Text-in-image is hard: If the user needs legible words baked in, say so explicitly in the prompt and verify the result carefully — consider …

    line 93

“Common” is measured: kept by at least 6 in 10 of the 33 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

Image Generation (via codex)

Why this exists

You (Claude) can't render pixels, but the codex CLI agent has a built-in image-generation tool. This skill makes you the harness: you turn the user's intent into a clean spec, hand it to codex, and guarantee the resulting image lands at a specific path on disk. codex writes images into its own internal store (~/.codex/generated_images/...); the user almost never wants it there, so the contract of this skill is: the image always arrives at the --output path you choose. A bundled script enforces that contract so you don't have to re-derive the plumbing.

The one thing that matters: the output path

Every generation MUST specify an absolute --output path, and the job is not done until a valid image file exists there. The bundled script (scripts/generate_image.py) drives codex and then independently verifies the file — if codex didn't place it, the script recovers the freshly generated PNG from codex's internal store and copies it over. Trust the script's exit code and JSON, but if you ever generate images another way, still confirm the file exists at the path.

Workflow

  1. Pin down the spec. From the user's request, assemble three things:
    • Subject (--prompt): what to depict, concretely. Describe the scene, subject, framing, mood. Specific beats vague ("a corner coffee shop at golden hour with people seated outside" beats "a coffee shop").
    • Style / brand guidelines (--style): the look — medium (photo, flat vector, 3D render, watercolor…), palette (name hex codes if the user has brand colors), lighting, texture, and hard constraints like "no text" or "transparent-feel background". This is where brand kits go.
    • Output path (--output): an absolute path ending in .png. If the user didn't give one, pick a sensible location (their project's assets dir, or ask if truly ambiguous) — never skip it.
  2. Pick orientation (--size): square, portrait, or landscape (or an explicit WxH like 1536x1024). Match the asset's use — landscape for hero/banner, portrait for posters, square for logos/avatars/social tiles.
  3. Run the script. Replace <SKILL_DIR> with this skill's base directory (Claude Code shows it when the skill loads; for a personal install it is ~/.claude/skills/image-generation). On Windows, if python3 is not found, use python or py instead.

    python3 "<SKILL_DIR>/scripts/generate_image.py" \
      --prompt "<subject>" \
      --style "<style / brand guidelines>" \
      --size landscape \
      --output /absolute/path/to/asset.png

    It prints progress to stderr and, on success, a JSON line to stdout: {"status": "success", "output": "...", "bytes": 3166389, "dimensions": "1536x1024", "source": "codex"}. Exit code 0 = a valid image is at --output; 2 = failure (read the stderr tail for codex's error).

  4. Show the result. Read the output file back to confirm it matches the brief, then tell the user the path. If it's off (wrong subject, ignored a constraint), refine the --prompt/--style and run again — image models respond well to more specific, concrete direction.

Editing or restyling an existing image

Pass the source image(s) as references; codex uses them as visual input:

python3 "<SKILL_DIR>/scripts/generate_image.py" \
  --prompt "Put this product on a marble kitchen counter in soft morning light" \
  --reference /path/to/product.png \
  --output /path/to/product_on_counter.png

--reference is repeatable (e.g., one image for the subject, one for the style to transfer).

Writing good specs (this drives quality more than anything)

  • Be concrete and visual. Name the subject, the setting, the camera/framing, the time of day, the mood. Models fill vague prompts with averages; specifics give you intent.
  • Put brand rules in --style. Palette (with hex), typography feel, "flat/minimal/photoreal", texture, and especially negative constraints ("no text", "no people", "no harsh shadows").
  • One asset per run. Ask for a single final image unless the user wants variations; then run multiple times to different --output paths.
  • Text-in-image is hard. If the user needs legible words baked in, say so explicitly in the prompt and verify the result carefully — consider adding text in post instead.

When NOT to use this skill

  • The user wants you to read, describe, or analyze an existing image → just view it.
  • They want a chart, graph, or data visualization → generate it with code (matplotlib, a JS charting lib, etc.), not an image model.
  • They want Figma designs or diagrams → use the Figma / diagram skills.

Deeper mechanics & troubleshooting

codex's invocation details, sandbox/auth notes, the internal generated_images layout, the fallback-recovery logic, and codex's own image use-case taxonomy (edits, compositing, style transfer, etc.) live in references/codex-image-generation.md. Read it if a run fails, if you need an edit mode beyond plain generation, or if you want to call codex directly without the script.

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.