Universal Imagegen logo

Universal Imagegen

Community
SnowSky1
universal-imagegen

Bring the Codex imagegen workflow, prompt engineering, use-case taxonomy, edit invariants, and prompt library to any general-purpose agent, then generate or edit raster images through a configurable Images API. Supports OpenAI-compatible services and Qwen-Image deployments exposed through compatible gateways.

Overview

PublisherSnowSky1
Repositoryuniversal-imagegen-agent
Skill nameuniversal-imagegen
Stars
232
Forks
12
Bundled files
55
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 55 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by SnowSky1 on GitHub. Read the source before you install it.

Installation

Install the Universal Imagegen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/SnowSky1/universal-imagegen-agent/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SnowSky1/universal-imagegen-agent.git \
  .claude/skills/universal-imagegen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Universal Imagegen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Universal Imagegen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Universal Imagegen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Universal Image Generation Skill

Adapted on 2026-09-24 from the OpenAI Codex imagegen skill. The unmodified source snapshot is preserved under upstream/imagegen/.

Runtime contract

This skill does not assume a host-specific built-in image tool.

  • Preferred execution: the npm/pnpm-installed imagegen-agent CLI.
  • If the global command is unavailable and package execution is allowed, use npx -y universal-imagegen-agent or pnpm dlx universal-imagegen-agent as the command prefix.
  • Reuse the bundled Codex-derived prompt library and workflow regardless of which compatible image model serves the request.
  • Machine-readable execution: always add --json.
  • Safe validation: run with --dry-run before a costly or destructive retry.
  • Credentials: read from environment variables only. Never ask a user to paste a complete API key into chat and never pass a key on the command line.
  • API portability: model, base URL, headers, and API-key environment variable are configurable. Do not assume one provider's model catalog.
  • Open models: Qwen-Image and similar deployments can be used when exposed through the bundled OpenAI-compatible interface. For native Diffusers, ComfyUI, SGLang, or another protocol, add a provider adapter rather than changing the agent-facing workflow.
  • Output safety: do not overwrite existing files unless the user explicitly authorizes replacement and --force is supplied.

Installation

Install the CLI and this skill together:

bash
npm install --global universal-imagegen-agent
imagegen-agent install-skill

Or install only the skill without keeping a global package:

bash
npx universal-imagegen-agent install-skill

Restart or reload the host agent after installation. The installer defaults to $CODEX_HOME/skills/universal-imagegen, or ~/.codex/skills/universal-imagegen when CODEX_HOME is unset. Use --target for another compatible agent's skill directory.

Intent decision

Classify the request independently along two axes:

  1. Intent:
    • generate: create a new image; reference images guide style, composition, mood, or subject.
    • edit: preserve an existing image while changing specified parts.
  2. Execution:
    • one asset;
    • multiple variants of one prompt (--n);
    • many distinct jobs (batch with one JSONL record per asset).

Assume generate unless the user explicitly asks to modify an existing image. For edits, label each input image by index and role in the prompt.

Workflow

  1. Determine whether the output is a preview or a project deliverable.
  2. Collect the primary request, exact in-image text, constraints, avoid list, input images, and required output path.
  3. Check configuration with imagegen-agent config --json.
  4. Structure the prompt using the schema below without inventing unrelated objects, brands, slogans, characters, palettes, or narrative details.
  5. For an edit, state invariants as change only X; keep Y unchanged.
  6. Run the intended request with --dry-run --json.
  7. Execute the real request only when configuration and paths are correct.
  8. Inspect every output for subject, composition, exact text, edit invariants, unwanted artifacts, and alpha-channel requirements.
  9. Iterate with one targeted change at a time.
  10. Report output paths, effective model/provider, and final prompt.

Prompt schema

Use only the useful lines:

text
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's request>
Input images: <Image 1: role; Image 2: role>
Scene/backdrop: <environment>
Subject: <main subject>
Style/medium: <photo, illustration, 3D, etc.>
Composition/framing: <viewpoint, crop, placement>
Lighting/mood: <lighting and mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Text (verbatim): "<exact text>"
Constraints: <must keep and must avoid>
Avoid: <negative constraints>

If the user prompt is already specific, normalize it without adding creative requirements. If it is generic, add only details that materially improve composition, intended use, or production quality.

Taxonomy

Generate:

  • photorealistic-natural
  • product-mockup
  • ui-mockup
  • infographic-diagram
  • scientific-educational
  • ads-marketing
  • productivity-visual
  • logo-brand
  • illustration-story
  • stylized-concept
  • historical-scene

Edit:

  • text-localization
  • identity-preserve
  • precise-object-edit
  • lighting-weather
  • background-extraction
  • style-transfer
  • compositing
  • sketch-to-render

CLI recipes

Configuration:

bash
imagegen-agent config --json

Generate:

bash
imagegen-agent generate "A minimal ceramic mug product photo" \
  --use-case product-mockup \
  --composition "wide composition with usable negative space" \
  --constraints "no logos; no text; no watermark" \
  --out output/imagegen/mug.png \
  --json

Edit:

bash
imagegen-agent edit \
  --image input.png \
  --prompt "Replace only the background with a warm sunset" \
  --constraints "keep the product, its edges, framing, and labels unchanged" \
  --out output/imagegen/sunset.png \
  --json

Batch:

bash
imagegen-agent batch jobs.jsonl \
  --out-dir output/imagegen/batch \
  --concurrency 4 \
  --json

Transparent output

Request an actually transparent background and use PNG or WebP. API capability varies by provider and model. If native transparency is unsupported, explain the limitation and ask before switching models or using chroma-key extraction. Never silently change the selected model.

Text and edits

  • Put exact text in quotes and request verbatim rendering with no extra text.
  • Spell difficult words character by character when accuracy is critical.
  • Preserve edit invariants on every iteration.
  • A mask guides generation but does not guarantee pixel-perfect boundaries.
  • For multi-image edits, image order is meaningful.

Boundaries

Use direct SVG, HTML/CSS, canvas, or repository-native editing instead when the task is deterministic vector work, a small change to an editable source asset, or an extension of an established icon/logo system.

References

  • references/prompting.md: runtime-neutral prompting guidance.
  • references/integration.md: configuration and agent integration.
  • references/sample-jobs.jsonl: batch examples.
  • upstream/imagegen/: complete original skill snapshot.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Universal Imagegen AI skill do?

Bring the Codex imagegen workflow, prompt engineering, use-case taxonomy, edit invariants, and prompt library to any general-purpose agent, then generate or edit raster images through a configurable Images API. Supports OpenAI-compatible services and Qwen-Image deployments exposed through compatible gateways.

Why use Universal Imagegen on TypingMind?

Because you install it once and use it with any model. Universal Imagegen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Universal Imagegen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/SnowSky1/universal-imagegen-agent/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Universal Imagegen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Universal Imagegen?

As many as you like. As long as a model supports skills, you can use Universal Imagegen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Universal Imagegen AI skill free?

Yes. It is published on GitHub by SnowSky1 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇