Universal Imagegenのロゴ

Universal Imagegen

コミュニティ
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.

概要

公開者SnowSky1
リポジトリuniversal-imagegen-agent
スキル名universal-imagegen
スター
232
フォーク
12
同梱ファイル
55
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 55個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    SnowSky1がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルUniversal ImagegenをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/SnowSky1/universal-imagegen-agent/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SnowSky1/universal-imagegen-agent.git \
  .claude/skills/universal-imagegen
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでUniversal Imagegenを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にUniversal Imagegenを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Universal Imagegenは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでUniversal Imagegenを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Universal Imagegenはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにUniversal Imagegenをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/SnowSky1/universal-imagegen-agent/tree/mainを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Universal Imagegenを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Universal Imagegenは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもUniversal Imagegenを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Universal Imagegen」は無料ですか?

はい。SnowSky1がGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇